From 5779ecec4de2df32b1739f453c2523f484af0665 Mon Sep 17 00:00:00 2001 From: Miles Yucht Date: Fri, 6 Dec 2024 11:00:26 +0100 Subject: [PATCH] works again --- .codegen/model.go.tmpl | 77 +- .../products/catalog/data_functions.go | 2 +- .../pluginfw/products/cluster/data_cluster.go | 2 +- .../data_notification_destinations.go | 2 +- .../registered_model/data_registered_model.go | 2 +- .../data_registered_model_versions.go | 2 +- .../serving/data_serving_endpoints.go | 2 +- internal/service/apps_tf/model.go | 1756 +- internal/service/billing_tf/model.go | 2027 +-- internal/service/catalog_tf/model.go | 13346 +++------------- internal/service/compute_tf/model.go | 10052 +++--------- internal/service/dashboards_tf/model.go | 2601 +-- internal/service/files_tf/model.go | 1923 +-- internal/service/iam_tf/model.go | 3751 +---- internal/service/jobs_tf/model.go | 7409 ++------- internal/service/marketplace_tf/model.go | 6203 ++----- internal/service/ml_tf/model.go | 8802 ++-------- internal/service/oauth2_tf/model.go | 1741 +- internal/service/pipelines_tf/model.go | 3358 +--- internal/service/provisioning_tf/model.go | 2895 +--- internal/service/serving_tf/model.go | 4174 +---- internal/service/settings_tf/model.go | 7712 ++------- internal/service/sharing_tf/model.go | 2442 +-- internal/service/sql_tf/model.go | 8427 ++-------- internal/service/vectorsearch_tf/model.go | 2351 +-- internal/service/workspace_tf/model.go | 4162 +---- 26 files changed, 17822 insertions(+), 77399 deletions(-) diff --git a/.codegen/model.go.tmpl b/.codegen/model.go.tmpl index f4c35839a..dd8d0943f 100644 --- a/.codegen/model.go.tmpl +++ b/.codegen/model.go.tmpl @@ -80,52 +80,22 @@ func (a {{.PascalName}}) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = {{.PascalName}}{} - -// Equal implements basetypes.ObjectValuable. -func (o {{.PascalName}}) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o {{.PascalName}}) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o {{.PascalName}}) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o {{.PascalName}}) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o {{.PascalName}}) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, {{.PascalName}} +// only implements ToObjectValue() and Type(). +func (o {{.PascalName}}) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o {{.PascalName}}) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + {{ range .Fields -}} + {{- $data := dict "field" . -}} + "{{template "tfsdk-name" $data}}": o.{{template "field-name" $data}}, + {{if and .Entity.Terraform .Entity.Terraform.IsServiceProposedIfEmpty -}} + {{- $data := dict "field" . "effective" true }} + "{{template "tfsdk-name" $data}}": o.{{template "field-name" $data}}, + {{- end -}} + {{- end}} + }) } // Type implements basetypes.ObjectValuable. @@ -154,14 +124,13 @@ func (o {{.PascalName}}) Type(ctx context.Context) attr.Type { {{- if .ArrayValue }}{{ template "complex-field-value" .ArrayValue }} {{- else if .MapValue }}{{ template "complex-field-value" .MapValue }} {{- else -}} - {{- if .IsExternal -}}{{.Package.Name}}.{{- end -}} {{- if or .IsString .Enum -}}types.String{} {{- else if .IsBool -}}types.Bool{} {{- else if .IsInt64 -}}types.Int64{} {{- else if .IsFloat64 -}}types.Float64{} {{- else if .IsInt -}}types.Int64{} - {{- else if .IsAny -}}struct{}{} - {{- else if or .IsEmpty .IsObject -}}{{.PascalName}}{} + {{- else if .IsAny -}}types.Object{} + {{- else if or .IsEmpty .IsObject -}}{{if .IsExternal}}{{.Package.Name}}.{{end}}{{.PascalName}}{} {{- end -}} {{- end -}} {{- end -}} @@ -201,7 +170,11 @@ even when they are called recursively. {{- define "field" -}} -{{if .effective}}Effective{{end}}{{.field.PascalName}}{{if eq .field.PascalName "Type"}}_{{end}} {{template "type" .field.Entity}} `{{template "field-tag" . }}` +{{template "field-name" .}} {{template "type" .field.Entity}} `{{template "field-tag" . }}` +{{- end -}} + +{{- define "field-name" -}} +{{if .effective}}Effective{{end}}{{.field.PascalName}}{{if eq .field.PascalName "Type"}}_{{end}} {{- end -}} {{- define "field-tag" -}} @@ -232,15 +205,15 @@ even when they are called recursively. {{- define "type" -}} {{- if not . }}any /* ERROR */ - {{- else if .IsExternal }}{{.Package.Name}}.{{.PascalName}} - {{- else if .IsAny}}any + {{- else if .IsExternal }}types.List{{/* Note: we use types.List for objects for now. TODO: change this to types.Object. */}} + {{- else if .IsAny}}types.Object {{- else if .IsEmpty}}types.List {{- else if .IsString}}types.String {{- else if .IsBool}}types.Bool {{- else if .IsInt64}}types.Int64 {{- else if .IsFloat64}}types.Float64 {{- else if .IsInt}}types.Int64 - {{- else if .IsByteStream}}io.ReadCloser + {{- else if .IsByteStream}}types.Object {{- else if .ArrayValue }}types.List {{- else if .MapValue }}types.Map {{- else if .IsObject }}types.List{{/* Note: we use types.List for objects for now. TODO: change this to types.Object. */}} diff --git a/internal/providers/pluginfw/products/catalog/data_functions.go b/internal/providers/pluginfw/products/catalog/data_functions.go index e199cc722..9048e7a3b 100644 --- a/internal/providers/pluginfw/products/catalog/data_functions.go +++ b/internal/providers/pluginfw/products/catalog/data_functions.go @@ -108,7 +108,7 @@ func (d *FunctionsDataSource) Read(ctx context.Context, req datasource.ReadReque if resp.Diagnostics.HasError() { return } - tfFunctions = append(tfFunctions, function) + tfFunctions = append(tfFunctions, function.ToObjectValue(ctx)) } functions.Functions = types.ListValueMust(catalog_tf.FunctionInfo{}.Type(ctx), tfFunctions) resp.Diagnostics.Append(resp.State.Set(ctx, functions)...) diff --git a/internal/providers/pluginfw/products/cluster/data_cluster.go b/internal/providers/pluginfw/products/cluster/data_cluster.go index 20250c7d0..6db44eaee 100644 --- a/internal/providers/pluginfw/products/cluster/data_cluster.go +++ b/internal/providers/pluginfw/products/cluster/data_cluster.go @@ -90,7 +90,7 @@ func (d *ClusterDataSource) Read(ctx context.Context, req datasource.ReadRequest clusterInfo.ClusterId = tfCluster.ClusterId clusterInfo.Name = tfCluster.ClusterName - clusterInfo.ClusterInfo = types.ListValueMust(tfCluster.Type(ctx), []attr.Value{tfCluster}) + clusterInfo.ClusterInfo = types.ListValueMust(tfCluster.Type(ctx), []attr.Value{tfCluster.ToObjectValue(ctx)}) resp.Diagnostics.Append(resp.State.Set(ctx, clusterInfo)...) } diff --git a/internal/providers/pluginfw/products/notificationdestinations/data_notification_destinations.go b/internal/providers/pluginfw/products/notificationdestinations/data_notification_destinations.go index baacf723d..5e6688bb7 100755 --- a/internal/providers/pluginfw/products/notificationdestinations/data_notification_destinations.go +++ b/internal/providers/pluginfw/products/notificationdestinations/data_notification_destinations.go @@ -119,7 +119,7 @@ func (d *NotificationDestinationsDataSource) Read(ctx context.Context, req datas if AppendDiagAndCheckErrors(resp, converters.GoSdkToTfSdkStruct(ctx, notification, ¬ificationDestination)) { return } - notificationsTfSdk = append(notificationsTfSdk, notificationDestination) + notificationsTfSdk = append(notificationsTfSdk, notificationDestination.ToObjectValue(ctx)) } notificationInfo.NotificationDestinations = types.ListValueMust(settings_tf.ListNotificationDestinationsResult{}.Type(ctx), notificationsTfSdk) 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 045413ee0..912f5b606 100644 --- a/internal/providers/pluginfw/products/registered_model/data_registered_model.go +++ b/internal/providers/pluginfw/products/registered_model/data_registered_model.go @@ -101,6 +101,6 @@ func (d *RegisteredModelDataSource) Read(ctx context.Context, req datasource.Rea modelInfo.Aliases, d = basetypes.NewListValueFrom(ctx, modelInfo.Aliases.ElementType(ctx), []catalog_tf.RegisteredModelAlias{}) resp.Diagnostics.Append(d...) } - registeredModel.ModelInfo = types.ListValueMust(catalog_tf.RegisteredModelInfo{}.Type(ctx), []attr.Value{modelInfo}) + registeredModel.ModelInfo = types.ListValueMust(catalog_tf.RegisteredModelInfo{}.Type(ctx), []attr.Value{modelInfo.ToObjectValue(ctx)}) resp.Diagnostics.Append(resp.State.Set(ctx, registeredModel)...) } 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 9e7ebff00..5e3ab0c55 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 @@ -81,7 +81,7 @@ func (d *RegisteredModelVersionsDataSource) Read(ctx context.Context, req dataso if resp.Diagnostics.HasError() { return } - tfModelVersions = append(tfModelVersions, modelVersion) + tfModelVersions = append(tfModelVersions, modelVersion.ToObjectValue(ctx)) } registeredModelVersions.ModelVersions = types.ListValueMust(catalog_tf.ModelVersionInfo{}.Type(ctx), tfModelVersions) resp.Diagnostics.Append(resp.State.Set(ctx, registeredModelVersions)...) diff --git a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go index 6fe6bc22a..51c5e2c64 100644 --- a/internal/providers/pluginfw/products/serving/data_serving_endpoints.go +++ b/internal/providers/pluginfw/products/serving/data_serving_endpoints.go @@ -82,7 +82,7 @@ func (d *ServingEndpointsDataSource) Read(ctx context.Context, req datasource.Re if resp.Diagnostics.HasError() { return } - tfEndpoints = append(tfEndpoints, endpointsInfo) + tfEndpoints = append(tfEndpoints, endpointsInfo.ToObjectValue(ctx)) } endpoints.Endpoints = types.ListValueMust(serving_tf.ServingEndpoint{}.Type(ctx), tfEndpoints) resp.Diagnostics.Append(resp.State.Set(ctx, endpoints)...) diff --git a/internal/service/apps_tf/model.go b/internal/service/apps_tf/model.go index cac158c41..9457b01d7 100755 --- a/internal/service/apps_tf/model.go +++ b/internal/service/apps_tf/model.go @@ -12,15 +12,11 @@ package apps_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type App struct { @@ -86,52 +82,30 @@ func (a App) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = App{} - -// Equal implements basetypes.ObjectValuable. -func (o App) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o App) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o App) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o App) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o App) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o App) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o App) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -196,52 +170,18 @@ func (a AppAccessControlRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -288,52 +228,19 @@ func (a AppAccessControlResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -396,52 +303,22 @@ func (a AppDeployment) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppDeployment{} - -// Equal implements basetypes.ObjectValuable. -func (o AppDeployment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppDeployment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppDeployment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppDeployment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppDeployment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppDeployment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppDeployment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -487,52 +364,15 @@ func (a AppDeploymentArtifacts) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppDeploymentArtifacts{} - -// Equal implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppDeploymentArtifacts) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppDeploymentArtifacts) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "source_code_path": o.SourceCodePath, + }) } // Type implements basetypes.ObjectValuable. @@ -568,52 +408,16 @@ func (a AppDeploymentStatus) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppDeploymentStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppDeploymentStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppDeploymentStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -653,52 +457,17 @@ func (a AppPermission) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o AppPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -741,52 +510,17 @@ func (a AppPermissions) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o AppPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -825,52 +559,16 @@ func (a AppPermissionsDescription) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -908,52 +606,16 @@ func (a AppPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "app_name": o.AppName, + }) } // Type implements basetypes.ObjectValuable. @@ -1005,52 +667,20 @@ func (a AppResource) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppResource{} - -// Equal implements basetypes.ObjectValuable. -func (o AppResource) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppResource) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppResource) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppResource) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppResource) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppResource) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppResource) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1100,52 +730,16 @@ func (a AppResourceJob) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppResourceJob{} - -// Equal implements basetypes.ObjectValuable. -func (o AppResourceJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppResourceJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppResourceJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppResourceJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppResourceJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppResourceJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppResourceJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "permission": o.Permission, + }) } // Type implements basetypes.ObjectValuable. @@ -1185,52 +779,17 @@ func (a AppResourceSecret) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppResourceSecret{} - -// Equal implements basetypes.ObjectValuable. -func (o AppResourceSecret) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppResourceSecret) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppResourceSecret) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppResourceSecret) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppResourceSecret) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppResourceSecret) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppResourceSecret) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "permission": o.Permission, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -1269,52 +828,16 @@ func (a AppResourceServingEndpoint) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppResourceServingEndpoint{} - -// Equal implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppResourceServingEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppResourceServingEndpoint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "permission": o.Permission, + }) } // Type implements basetypes.ObjectValuable. @@ -1352,52 +875,16 @@ func (a AppResourceSqlWarehouse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AppResourceSqlWarehouse{} - -// Equal implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AppResourceSqlWarehouse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AppResourceSqlWarehouse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "permission": o.Permission, + }) } // Type implements basetypes.ObjectValuable. @@ -1434,52 +921,16 @@ func (a ApplicationStatus) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ApplicationStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o ApplicationStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ApplicationStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ApplicationStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ApplicationStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ApplicationStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ApplicationStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ApplicationStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -1516,52 +967,16 @@ func (a ComputeStatus) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ComputeStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o ComputeStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ComputeStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ComputeStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ComputeStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ComputeStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ComputeStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ComputeStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -1600,52 +1015,16 @@ func (a CreateAppDeploymentRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAppDeploymentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAppDeploymentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAppDeploymentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_deployment": o.AppDeployment, + "app_name": o.AppName, + }) } // Type implements basetypes.ObjectValuable. @@ -1684,52 +1063,15 @@ func (a CreateAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app": o.App, + }) } // Type implements basetypes.ObjectValuable. @@ -1766,52 +1108,15 @@ func (a DeleteAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1848,52 +1153,16 @@ func (a GetAppDeploymentRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAppDeploymentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAppDeploymentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAppDeploymentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_name": o.AppName, + "deployment_id": o.DeploymentId, + }) } // Type implements basetypes.ObjectValuable. @@ -1929,52 +1198,15 @@ func (a GetAppPermissionLevelsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAppPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_name": o.AppName, + }) } // Type implements basetypes.ObjectValuable. @@ -2010,52 +1242,15 @@ func (a GetAppPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAppPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAppPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -2092,52 +1287,15 @@ func (a GetAppPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAppPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAppPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAppPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_name": o.AppName, + }) } // Type implements basetypes.ObjectValuable. @@ -2172,52 +1330,15 @@ func (a GetAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2257,52 +1378,17 @@ func (a ListAppDeploymentsRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAppDeploymentsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAppDeploymentsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAppDeploymentsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_name": o.AppName, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2342,52 +1428,16 @@ func (a ListAppDeploymentsResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAppDeploymentsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAppDeploymentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAppDeploymentsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_deployments": o.AppDeployments, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2428,52 +1478,16 @@ func (a ListAppsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAppsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAppsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAppsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAppsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAppsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAppsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAppsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAppsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2511,52 +1525,16 @@ func (a ListAppsResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAppsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAppsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAppsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAppsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAppsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAppsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAppsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAppsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2593,52 +1571,15 @@ func (a StartAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o StartAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2672,52 +1613,15 @@ func (a StopAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StopAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o StopAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StopAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StopAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StopAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StopAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StopAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StopAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2756,52 +1660,16 @@ func (a UpdateAppRequest) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAppRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAppRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAppRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAppRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAppRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAppRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAppRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAppRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app": o.App, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/billing_tf/model.go b/internal/service/billing_tf/model.go index 2d1722662..66e3e5734 100755 --- a/internal/service/billing_tf/model.go +++ b/internal/service/billing_tf/model.go @@ -12,16 +12,11 @@ package billing_tf import ( "context" - "fmt" - "io" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type ActionConfiguration struct { @@ -50,52 +45,17 @@ func (a ActionConfiguration) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ActionConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o ActionConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ActionConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ActionConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ActionConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ActionConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ActionConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ActionConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "action_configuration_id": o.ActionConfigurationId, + "action_type": o.ActionType, + "target": o.Target, + }) } // Type implements basetypes.ObjectValuable. @@ -147,52 +107,20 @@ func (a AlertConfiguration) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -252,52 +180,21 @@ func (a BudgetConfiguration) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BudgetConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o BudgetConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BudgetConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BudgetConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BudgetConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BudgetConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BudgetConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BudgetConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -348,52 +245,16 @@ func (a BudgetConfigurationFilter) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BudgetConfigurationFilter{} - -// Equal implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "tags": o.Tags, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -435,52 +296,16 @@ func (a BudgetConfigurationFilterClause) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BudgetConfigurationFilterClause{} - -// Equal implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterClause) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterClause) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "operator": o.Operator, + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -520,52 +345,16 @@ func (a BudgetConfigurationFilterTagClause) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BudgetConfigurationFilterTagClause{} - -// Equal implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterTagClause) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterTagClause) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -605,52 +394,16 @@ func (a BudgetConfigurationFilterWorkspaceIdClause) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BudgetConfigurationFilterWorkspaceIdClause{} - -// Equal implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BudgetConfigurationFilterWorkspaceIdClause) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BudgetConfigurationFilterWorkspaceIdClause) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "operator": o.Operator, + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -692,52 +445,16 @@ func (a CreateBillingUsageDashboardRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBillingUsageDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBillingUsageDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_type": o.DashboardType, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -772,52 +489,15 @@ func (a CreateBillingUsageDashboardResponse) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBillingUsageDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBillingUsageDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBillingUsageDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -864,52 +544,18 @@ func (a CreateBudgetConfigurationBudget) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBudgetConfigurationBudget{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudget) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "account_id": o.AccountId, + "alert_configurations": o.AlertConfigurations, + "display_name": o.DisplayName, + "filter": o.Filter, + }) } // Type implements basetypes.ObjectValuable. @@ -952,52 +598,16 @@ func (a CreateBudgetConfigurationBudgetActionConfigurations) GetComplexFieldType return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBudgetConfigurationBudgetActionConfigurations{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudgetActionConfigurations) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetActionConfigurations) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "action_type": o.ActionType, + "target": o.Target, + }) } // Type implements basetypes.ObjectValuable. @@ -1046,52 +656,19 @@ func (a CreateBudgetConfigurationBudgetAlertConfigurations) GetComplexFieldTypes } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBudgetConfigurationBudgetAlertConfigurations{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationBudgetAlertConfigurations) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationBudgetAlertConfigurations) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1133,52 +710,15 @@ func (a CreateBudgetConfigurationRequest) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBudgetConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget": o.Budget, + }) } // Type implements basetypes.ObjectValuable. @@ -1216,52 +756,15 @@ func (a CreateBudgetConfigurationResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateBudgetConfigurationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateBudgetConfigurationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget": o.Budget, + }) } // Type implements basetypes.ObjectValuable. @@ -1366,52 +869,23 @@ func (a CreateLogDeliveryConfigurationParams) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateLogDeliveryConfigurationParams{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateLogDeliveryConfigurationParams) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateLogDeliveryConfigurationParams) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1456,52 +930,15 @@ func (a DeleteBudgetConfigurationRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteBudgetConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteBudgetConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget_id": o.BudgetId, + }) } // Type implements basetypes.ObjectValuable. @@ -1533,52 +970,13 @@ func (a DeleteBudgetConfigurationResponse) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteBudgetConfigurationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteBudgetConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteBudgetConfigurationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1619,52 +1017,17 @@ func (a DownloadRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DownloadRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DownloadRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DownloadRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DownloadRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DownloadRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DownloadRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DownloadRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DownloadRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "end_month": o.EndMonth, + "personal_data": o.PersonalData, + "start_month": o.StartMonth, + }) } // Type implements basetypes.ObjectValuable. @@ -1679,7 +1042,7 @@ func (o DownloadRequest) Type(ctx context.Context) attr.Type { } type DownloadResponse struct { - Contents io.ReadCloser `tfsdk:"-"` + Contents types.Object `tfsdk:"-"` } func (newState *DownloadResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan DownloadResponse) { @@ -1699,52 +1062,15 @@ func (a DownloadResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DownloadResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DownloadResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DownloadResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DownloadResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DownloadResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DownloadResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DownloadResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DownloadResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "contents": o.Contents, + }) } // Type implements basetypes.ObjectValuable. @@ -1784,52 +1110,16 @@ func (a GetBillingUsageDashboardRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetBillingUsageDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetBillingUsageDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_type": o.DashboardType, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1866,52 +1156,16 @@ func (a GetBillingUsageDashboardResponse) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetBillingUsageDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetBillingUsageDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetBillingUsageDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "dashboard_url": o.DashboardUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -1947,52 +1201,15 @@ func (a GetBudgetConfigurationRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetBudgetConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetBudgetConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget_id": o.BudgetId, + }) } // Type implements basetypes.ObjectValuable. @@ -2027,52 +1244,15 @@ func (a GetBudgetConfigurationResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetBudgetConfigurationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetBudgetConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetBudgetConfigurationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget": o.Budget, + }) } // Type implements basetypes.ObjectValuable. @@ -2109,52 +1289,15 @@ func (a GetLogDeliveryRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetLogDeliveryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetLogDeliveryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetLogDeliveryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_delivery_configuration_id": o.LogDeliveryConfigurationId, + }) } // Type implements basetypes.ObjectValuable. @@ -2191,52 +1334,15 @@ func (a ListBudgetConfigurationsRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListBudgetConfigurationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListBudgetConfigurationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2274,52 +1380,16 @@ func (a ListBudgetConfigurationsResponse) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListBudgetConfigurationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListBudgetConfigurationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListBudgetConfigurationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budgets": o.Budgets, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2361,52 +1431,17 @@ func (a ListLogDeliveryRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListLogDeliveryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListLogDeliveryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListLogDeliveryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + "status": o.Status, + "storage_configuration_id": o.StorageConfigurationId, + }) } // Type implements basetypes.ObjectValuable. @@ -2524,52 +1559,28 @@ func (a LogDeliveryConfiguration) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogDeliveryConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogDeliveryConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogDeliveryConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2638,52 +1649,18 @@ func (a LogDeliveryStatus) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogDeliveryStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogDeliveryStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogDeliveryStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2718,52 +1695,13 @@ func (a PatchStatusResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PatchStatusResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PatchStatusResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PatchStatusResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PatchStatusResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PatchStatusResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PatchStatusResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PatchStatusResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PatchStatusResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2810,52 +1748,19 @@ func (a UpdateBudgetConfigurationBudget) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateBudgetConfigurationBudget{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationBudget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationBudget) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2902,52 +1807,16 @@ func (a UpdateBudgetConfigurationRequest) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateBudgetConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget": o.Budget, + "budget_id": o.BudgetId, + }) } // Type implements basetypes.ObjectValuable. @@ -2986,52 +1855,15 @@ func (a UpdateBudgetConfigurationResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateBudgetConfigurationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateBudgetConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateBudgetConfigurationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "budget": o.Budget, + }) } // Type implements basetypes.ObjectValuable. @@ -3073,52 +1905,16 @@ func (a UpdateLogDeliveryConfigurationStatusRequest) GetComplexFieldTypes(ctx co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateLogDeliveryConfigurationStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateLogDeliveryConfigurationStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateLogDeliveryConfigurationStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_delivery_configuration_id": o.LogDeliveryConfigurationId, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -3154,52 +1950,15 @@ func (a WrappedCreateLogDeliveryConfiguration) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WrappedCreateLogDeliveryConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WrappedCreateLogDeliveryConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WrappedCreateLogDeliveryConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_delivery_configuration": o.LogDeliveryConfiguration, + }) } // Type implements basetypes.ObjectValuable. @@ -3236,52 +1995,15 @@ func (a WrappedLogDeliveryConfiguration) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WrappedLogDeliveryConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WrappedLogDeliveryConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_delivery_configuration": o.LogDeliveryConfiguration, + }) } // Type implements basetypes.ObjectValuable. @@ -3318,52 +2040,15 @@ func (a WrappedLogDeliveryConfigurations) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WrappedLogDeliveryConfigurations{} - -// Equal implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WrappedLogDeliveryConfigurations) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WrappedLogDeliveryConfigurations) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_delivery_configurations": o.LogDeliveryConfigurations, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/catalog_tf/model.go b/internal/service/catalog_tf/model.go index c7f33168a..fce3e2ef0 100755 --- a/internal/service/catalog_tf/model.go +++ b/internal/service/catalog_tf/model.go @@ -12,15 +12,11 @@ package catalog_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AccountsCreateMetastore struct { @@ -46,52 +42,15 @@ func (a AccountsCreateMetastore) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsCreateMetastore{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateMetastore) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsCreateMetastore) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_info": o.MetastoreInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -132,52 +91,17 @@ func (a AccountsCreateMetastoreAssignment) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsCreateMetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateMetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsCreateMetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -218,52 +142,16 @@ func (a AccountsCreateStorageCredential) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsCreateStorageCredential{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsCreateStorageCredential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsCreateStorageCredential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -301,52 +189,15 @@ func (a AccountsMetastoreAssignment) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsMetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsMetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsMetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + }) } // Type implements basetypes.ObjectValuable. @@ -383,52 +234,15 @@ func (a AccountsMetastoreInfo) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsMetastoreInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsMetastoreInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsMetastoreInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_info": o.MetastoreInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -465,52 +279,15 @@ func (a AccountsStorageCredentialInfo) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsStorageCredentialInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsStorageCredentialInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsStorageCredentialInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -550,52 +327,16 @@ func (a AccountsUpdateMetastore) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsUpdateMetastore{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateMetastore) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastore) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "metastore_info": o.MetastoreInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -637,52 +378,17 @@ func (a AccountsUpdateMetastoreAssignment) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsUpdateMetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateMetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsUpdateMetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_assignment": o.MetastoreAssignment, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -725,52 +431,17 @@ func (a AccountsUpdateStorageCredential) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccountsUpdateStorageCredential{} - -// Equal implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccountsUpdateStorageCredential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccountsUpdateStorageCredential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_info": o.CredentialInfo, + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) } // Type implements basetypes.ObjectValuable. @@ -816,52 +487,18 @@ func (a ArtifactAllowlistInfo) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ArtifactAllowlistInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ArtifactAllowlistInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ArtifactAllowlistInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact_matchers": o.ArtifactMatchers, + "created_at": o.CreatedAt, + "created_by": o.CreatedBy, + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -902,52 +539,16 @@ func (a ArtifactMatcher) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ArtifactMatcher{} - -// Equal implements basetypes.ObjectValuable. -func (o ArtifactMatcher) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ArtifactMatcher) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ArtifactMatcher) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ArtifactMatcher) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ArtifactMatcher) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ArtifactMatcher) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ArtifactMatcher) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact": o.Artifact, + "match_type": o.MatchType, + }) } // Type implements basetypes.ObjectValuable. @@ -980,52 +581,13 @@ func (a AssignResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AssignResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AssignResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AssignResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AssignResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AssignResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AssignResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AssignResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AssignResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1067,52 +629,18 @@ func (a AwsCredentials) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsCredentials{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsCredentials) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsCredentials) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsCredentials) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsCredentials) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsCredentials) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsCredentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsCredentials) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1157,52 +685,17 @@ func (a AwsIamRole) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsIamRole{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsIamRole) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsIamRole) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsIamRole) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsIamRole) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsIamRole) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsIamRole) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsIamRole) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + "unity_catalog_iam_arn": o.UnityCatalogIamArn, + }) } // Type implements basetypes.ObjectValuable. @@ -1238,52 +731,15 @@ func (a AwsIamRoleRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsIamRoleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsIamRoleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsIamRoleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "role_arn": o.RoleArn, + }) } // Type implements basetypes.ObjectValuable. @@ -1323,52 +779,17 @@ func (a AwsIamRoleResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsIamRoleResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsIamRoleResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsIamRoleResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + "unity_catalog_iam_arn": o.UnityCatalogIamArn, + }) } // Type implements basetypes.ObjectValuable. @@ -1408,52 +829,15 @@ func (a AzureActiveDirectoryToken) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureActiveDirectoryToken{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureActiveDirectoryToken) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureActiveDirectoryToken) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aad_token": o.AadToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1502,52 +886,17 @@ func (a AzureManagedIdentity) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureManagedIdentity{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentity) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentity) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_connector_id": o.AccessConnectorId, + "credential_id": o.CredentialId, + "managed_identity_id": o.ManagedIdentityId, + }) } // Type implements basetypes.ObjectValuable. @@ -1592,52 +941,16 @@ func (a AzureManagedIdentityRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureManagedIdentityRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentityRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentityRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_connector_id": o.AccessConnectorId, + "managed_identity_id": o.ManagedIdentityId, + }) } // Type implements basetypes.ObjectValuable. @@ -1683,52 +996,17 @@ func (a AzureManagedIdentityResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureManagedIdentityResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureManagedIdentityResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureManagedIdentityResponse) 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. @@ -1771,52 +1049,17 @@ func (a AzureServicePrincipal) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureServicePrincipal{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureServicePrincipal) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureServicePrincipal) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "application_id": o.ApplicationId, + "client_secret": o.ClientSecret, + "directory_id": o.DirectoryId, + }) } // Type implements basetypes.ObjectValuable. @@ -1854,52 +1097,15 @@ func (a AzureUserDelegationSas) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureUserDelegationSas{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureUserDelegationSas) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureUserDelegationSas) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "sas_token": o.SasToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1936,52 +1142,16 @@ func (a CancelRefreshRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelRefreshRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelRefreshRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelRefreshRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "refresh_id": o.RefreshId, + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -2014,52 +1184,13 @@ func (a CancelRefreshResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelRefreshResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelRefreshResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelRefreshResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2149,52 +1280,38 @@ func (a CatalogInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CatalogInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CatalogInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CatalogInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CatalogInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CatalogInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CatalogInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CatalogInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CatalogInfo) 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. @@ -2263,52 +1380,17 @@ func (a CloudflareApiToken) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CloudflareApiToken{} - -// Equal implements basetypes.ObjectValuable. -func (o CloudflareApiToken) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CloudflareApiToken) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CloudflareApiToken) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CloudflareApiToken) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CloudflareApiToken) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CloudflareApiToken) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CloudflareApiToken) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_key_id": o.AccessKeyId, + "account_id": o.AccountId, + "secret_access_key": o.SecretAccessKey, + }) } // Type implements basetypes.ObjectValuable. @@ -2368,52 +1450,26 @@ func (a ColumnInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ColumnInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ColumnInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ColumnInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ColumnInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ColumnInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2467,52 +1523,16 @@ func (a ColumnMask) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ColumnMask{} - -// Equal implements basetypes.ObjectValuable. -func (o ColumnMask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ColumnMask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ColumnMask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ColumnMask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ColumnMask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ColumnMask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ColumnMask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "function_name": o.FunctionName, + "using_column_names": o.UsingColumnNames, + }) } // Type implements basetypes.ObjectValuable. @@ -2590,52 +1610,33 @@ func (a ConnectionInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ConnectionInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ConnectionInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ConnectionInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ConnectionInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ConnectionInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ConnectionInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ConnectionInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ConnectionInfo) 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. @@ -2704,52 +1705,17 @@ func (a ContinuousUpdateStatus) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ContinuousUpdateStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ContinuousUpdateStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ContinuousUpdateStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "initial_pipeline_sync_progress": o.InitialPipelineSyncProgress, + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + }) } // Type implements basetypes.ObjectValuable. @@ -2807,52 +1773,22 @@ func (a CreateCatalog) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCatalog{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCatalog) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCatalog) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCatalog) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCatalog) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCatalog) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCatalog) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCatalog) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2911,52 +1847,20 @@ func (a CreateConnection) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateConnection{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateConnection) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateConnection) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateConnection) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateConnection) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateConnection) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateConnection) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateConnection) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3024,52 +1928,23 @@ func (a CreateCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "comment": o.Comment, + "gcp_service_account_key": o.GcpServiceAccountKey, + "name": o.Name, + "purpose": o.Purpose, + "read_only": o.ReadOnly, + "skip_validation": o.SkipValidation, + }) } // Type implements basetypes.ObjectValuable. @@ -3140,52 +2015,23 @@ func (a CreateExternalLocation) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExternalLocation{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExternalLocation) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExternalLocation) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExternalLocation) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExternalLocation) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExternalLocation) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExternalLocation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExternalLocation) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3277,52 +2123,35 @@ func (a CreateFunction) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateFunction{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateFunction) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateFunction) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateFunction) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateFunction) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateFunction) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateFunction) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateFunction) 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. @@ -3384,52 +2213,15 @@ func (a CreateFunctionRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateFunctionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateFunctionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateFunctionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "function_info": o.FunctionInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -3472,52 +2264,17 @@ func (a CreateMetastore) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateMetastore{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateMetastore) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateMetastore) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateMetastore) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateMetastore) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateMetastore) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateMetastore) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateMetastore) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "region": o.Region, + "storage_root": o.StorageRoot, + }) } // Type implements basetypes.ObjectValuable. @@ -3559,52 +2316,17 @@ func (a CreateMetastoreAssignment) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateMetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateMetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateMetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -3685,52 +2407,28 @@ func (a CreateMonitor) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateMonitor{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateMonitor) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateMonitor) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateMonitor) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateMonitor) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateMonitor) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateMonitor) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateMonitor) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3796,52 +2494,15 @@ func (a CreateOnlineTableRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateOnlineTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateOnlineTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateOnlineTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table": o.Table, + }) } // Type implements basetypes.ObjectValuable. @@ -3886,52 +2547,19 @@ func (a CreateRegisteredModelRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRegisteredModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRegisteredModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRegisteredModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3967,52 +2595,13 @@ func (a CreateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4054,52 +2643,19 @@ func (a CreateSchema) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateSchema{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateSchema) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateSchema) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateSchema) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateSchema) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateSchema) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateSchema) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateSchema) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4162,52 +2718,23 @@ func (a CreateStorageCredential) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateStorageCredential{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateStorageCredential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateStorageCredential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateStorageCredential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateStorageCredential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateStorageCredential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateStorageCredential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateStorageCredential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4265,52 +2792,16 @@ func (a CreateTableConstraint) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateTableConstraint{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateTableConstraint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateTableConstraint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateTableConstraint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateTableConstraint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateTableConstraint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateTableConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateTableConstraint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "constraint": o.Constraint, + "full_name_arg": o.FullNameArg, + }) } // Type implements basetypes.ObjectValuable. @@ -4357,52 +2848,20 @@ func (a CreateVolumeRequestContent) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVolumeRequestContent{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVolumeRequestContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVolumeRequestContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4481,52 +2940,31 @@ func (a CredentialInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CredentialInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CredentialInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CredentialInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CredentialInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CredentialInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CredentialInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CredentialInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CredentialInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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, + "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. @@ -4584,52 +3022,16 @@ func (a CredentialValidationResult) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CredentialValidationResult{} - -// Equal implements basetypes.ObjectValuable. -func (o CredentialValidationResult) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CredentialValidationResult) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CredentialValidationResult) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CredentialValidationResult) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CredentialValidationResult) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CredentialValidationResult) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CredentialValidationResult) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "result": o.Result, + }) } // Type implements basetypes.ObjectValuable. @@ -4667,52 +3069,15 @@ func (a CurrentWorkspaceBindings) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CurrentWorkspaceBindings{} - -// Equal implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CurrentWorkspaceBindings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CurrentWorkspaceBindings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspaces": o.Workspaces, + }) } // Type implements basetypes.ObjectValuable. @@ -4746,52 +3111,13 @@ func (a DatabricksGcpServiceAccountRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DatabricksGcpServiceAccountRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DatabricksGcpServiceAccountRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4826,52 +3152,16 @@ func (a DatabricksGcpServiceAccountResponse) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DatabricksGcpServiceAccountResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DatabricksGcpServiceAccountResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DatabricksGcpServiceAccountResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + "email": o.Email, + }) } // Type implements basetypes.ObjectValuable. @@ -4909,52 +3199,16 @@ func (a DeleteAccountMetastoreAssignmentRequest) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountMetastoreAssignmentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountMetastoreAssignmentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreAssignmentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -4992,52 +3246,16 @@ func (a DeleteAccountMetastoreRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountMetastoreRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountMetastoreRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountMetastoreRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -5078,52 +3296,17 @@ func (a DeleteAccountStorageCredentialRequest) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountStorageCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountStorageCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountStorageCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) } // Type implements basetypes.ObjectValuable. @@ -5162,52 +3345,16 @@ func (a DeleteAliasRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAliasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAliasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAliasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -5240,52 +3387,13 @@ func (a DeleteAliasResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAliasResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAliasResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAliasResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5320,52 +3428,16 @@ func (a DeleteCatalogRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCatalogRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCatalogRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCatalogRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5401,52 +3473,15 @@ func (a DeleteConnectionRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteConnectionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteConnectionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteConnectionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5485,61 +3520,25 @@ func (a DeleteCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCredentialRequest{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialRequest) 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, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "force": types.BoolType, - "name_arg": types.StringType, - }, +// Type implements basetypes.ObjectValuable. +func (o DeleteCredentialRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "force": types.BoolType, + "name_arg": types.StringType, + }, } } @@ -5563,52 +3562,13 @@ func (a DeleteCredentialResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCredentialResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCredentialResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5643,52 +3603,16 @@ func (a DeleteExternalLocationRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExternalLocationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExternalLocationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExternalLocationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5727,52 +3651,16 @@ func (a DeleteFunctionRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteFunctionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteFunctionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteFunctionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5810,52 +3698,16 @@ func (a DeleteMetastoreRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteMetastoreRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteMetastoreRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteMetastoreRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -5893,52 +3745,16 @@ func (a DeleteModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -5974,52 +3790,15 @@ func (a DeleteOnlineTableRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteOnlineTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteOnlineTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteOnlineTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -6054,52 +3833,15 @@ func (a DeleteQualityMonitorRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteQualityMonitorRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteQualityMonitorRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteQualityMonitorRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -6134,52 +3876,15 @@ func (a DeleteRegisteredModelRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRegisteredModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRegisteredModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRegisteredModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -6211,52 +3916,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -6291,52 +3957,16 @@ func (a DeleteSchemaRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteSchemaRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteSchemaRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteSchemaRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -6375,52 +4005,16 @@ func (a DeleteStorageCredentialRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteStorageCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteStorageCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteStorageCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "force": o.Force, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -6462,52 +4056,17 @@ func (a DeleteTableConstraintRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTableConstraintRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTableConstraintRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTableConstraintRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cascade": o.Cascade, + "constraint_name": o.ConstraintName, + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -6544,52 +4103,15 @@ func (a DeleteTableRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -6624,52 +4146,15 @@ func (a DeleteVolumeRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteVolumeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteVolumeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteVolumeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -6708,52 +4193,15 @@ func (a DeltaRuntimePropertiesKvPairs) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeltaRuntimePropertiesKvPairs{} - -// Equal implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeltaRuntimePropertiesKvPairs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeltaRuntimePropertiesKvPairs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "delta_runtime_properties": o.DeltaRuntimeProperties, + }) } // Type implements basetypes.ObjectValuable. @@ -6796,52 +4244,16 @@ func (a Dependency) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Dependency{} - -// Equal implements basetypes.ObjectValuable. -func (o Dependency) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Dependency) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Dependency) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Dependency) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Dependency) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Dependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Dependency) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "function": o.Function, + "table": o.Table, + }) } // Type implements basetypes.ObjectValuable. @@ -6883,52 +4295,15 @@ func (a DependencyList) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DependencyList{} - -// Equal implements basetypes.ObjectValuable. -func (o DependencyList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DependencyList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DependencyList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DependencyList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DependencyList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DependencyList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DependencyList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dependencies": o.Dependencies, + }) } // Type implements basetypes.ObjectValuable. @@ -6967,52 +4342,16 @@ func (a DisableRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DisableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DisableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DisableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DisableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DisableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DisableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DisableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DisableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "schema_name": o.SchemaName, + }) } // Type implements basetypes.ObjectValuable. @@ -7045,52 +4384,13 @@ func (a DisableResponse) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DisableResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DisableResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DisableResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DisableResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DisableResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DisableResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DisableResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DisableResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7125,52 +4425,15 @@ func (a EffectivePermissionsList) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EffectivePermissionsList{} - -// Equal implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EffectivePermissionsList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EffectivePermissionsList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + }) } // Type implements basetypes.ObjectValuable. @@ -7213,52 +4476,17 @@ func (a EffectivePredictiveOptimizationFlag) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EffectivePredictiveOptimizationFlag{} - -// Equal implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EffectivePredictiveOptimizationFlag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EffectivePredictiveOptimizationFlag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited_from_name": o.InheritedFromName, + "inherited_from_type": o.InheritedFromType, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -7302,52 +4530,17 @@ func (a EffectivePrivilege) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EffectivePrivilege{} - -// Equal implements basetypes.ObjectValuable. -func (o EffectivePrivilege) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EffectivePrivilege) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EffectivePrivilege) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EffectivePrivilege) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EffectivePrivilege) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EffectivePrivilege) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EffectivePrivilege) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited_from_name": o.InheritedFromName, + "inherited_from_type": o.InheritedFromType, + "privilege": o.Privilege, + }) } // Type implements basetypes.ObjectValuable. @@ -7388,52 +4581,16 @@ func (a EffectivePrivilegeAssignment) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EffectivePrivilegeAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EffectivePrivilegeAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EffectivePrivilegeAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) } // Type implements basetypes.ObjectValuable. @@ -7473,52 +4630,16 @@ func (a EnableRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o EnableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "schema_name": o.SchemaName, + }) } // Type implements basetypes.ObjectValuable. @@ -7551,52 +4672,13 @@ func (a EnableResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnableResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EnableResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnableResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnableResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnableResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnableResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnableResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnableResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7624,59 +4706,22 @@ func (newState *EncryptionDetails) SyncEffectiveFieldsDuringRead(existingState E // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must be either primitive values from the // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF -// SDK values. -func (a EncryptionDetails) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EncryptionDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o EncryptionDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EncryptionDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EncryptionDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EncryptionDetails) String() string { - return fmt.Sprintf("%#v", o) +// SDK values. +func (a EncryptionDetails) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "sse_encryption_details": reflect.TypeOf(SseEncryptionDetails{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o EncryptionDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, EncryptionDetails +// only implements ToObjectValue() and Type(). +func (o EncryptionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EncryptionDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "sse_encryption_details": o.SseEncryptionDetails, + }) } // Type implements basetypes.ObjectValuable. @@ -7713,52 +4758,15 @@ func (a ExistsRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExistsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExistsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExistsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExistsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExistsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExistsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, ExistsRequest +// only implements ToObjectValue() and Type(). +func (o ExistsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExistsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + }) } // Type implements basetypes.ObjectValuable. @@ -7831,52 +4839,31 @@ func (a ExternalLocationInfo) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExternalLocationInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExternalLocationInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExternalLocationInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7937,52 +4924,16 @@ func (a FailedStatus) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FailedStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o FailedStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FailedStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FailedStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FailedStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FailedStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FailedStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FailedStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + }) } // Type implements basetypes.ObjectValuable. @@ -8026,52 +4977,18 @@ func (a ForeignKeyConstraint) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ForeignKeyConstraint{} - -// Equal implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ForeignKeyConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ForeignKeyConstraint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "child_columns": o.ChildColumns, + "name": o.Name, + "parent_columns": o.ParentColumns, + "parent_table": o.ParentTable, + }) } // Type implements basetypes.ObjectValuable. @@ -8114,52 +5031,15 @@ func (a FunctionDependency) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FunctionDependency{} - -// Equal implements basetypes.ObjectValuable. -func (o FunctionDependency) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FunctionDependency) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FunctionDependency) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FunctionDependency) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FunctionDependency) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FunctionDependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FunctionDependency) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "function_full_name": o.FunctionFullName, + }) } // Type implements basetypes.ObjectValuable. @@ -8262,52 +5142,44 @@ func (a FunctionInfo) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FunctionInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o FunctionInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FunctionInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FunctionInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FunctionInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FunctionInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FunctionInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FunctionInfo) 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. @@ -8398,52 +5270,26 @@ func (a FunctionParameterInfo) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FunctionParameterInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FunctionParameterInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FunctionParameterInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8491,52 +5337,15 @@ func (a FunctionParameterInfos) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FunctionParameterInfos{} - -// Equal implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FunctionParameterInfos) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FunctionParameterInfos) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -8573,52 +5382,15 @@ func (a GcpOauthToken) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpOauthToken{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpOauthToken) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpOauthToken) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpOauthToken) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpOauthToken) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpOauthToken) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpOauthToken) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpOauthToken) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "oauth_token": o.OauthToken, + }) } // Type implements basetypes.ObjectValuable. @@ -8657,52 +5429,17 @@ func (a GcpServiceAccountKey) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpServiceAccountKey{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, GcpServiceAccountKey +// only implements ToObjectValue() and Type(). +func (o GcpServiceAccountKey) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpServiceAccountKey) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "email": o.Email, + "private_key": o.PrivateKey, + "private_key_id": o.PrivateKeyId, + }) } // Type implements basetypes.ObjectValuable. @@ -8743,52 +5480,15 @@ func (a GenerateTemporaryServiceCredentialAzureOptions) GetComplexFieldTypes(ctx } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenerateTemporaryServiceCredentialAzureOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryServiceCredentialAzureOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialAzureOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "resources": o.Resources, + }) } // Type implements basetypes.ObjectValuable. @@ -8829,52 +5529,16 @@ func (a GenerateTemporaryServiceCredentialRequest) GetComplexFieldTypes(ctx cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenerateTemporaryServiceCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryServiceCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryServiceCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "azure_options": o.AzureOptions, + "credential_name": o.CredentialName, + }) } // Type implements basetypes.ObjectValuable. @@ -8915,52 +5579,16 @@ func (a GenerateTemporaryTableCredentialRequest) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenerateTemporaryTableCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryTableCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "operation": o.Operation, + "table_id": o.TableId, + }) } // Type implements basetypes.ObjectValuable. @@ -9020,52 +5648,21 @@ func (a GenerateTemporaryTableCredentialResponse) GetComplexFieldTypes(ctx conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenerateTemporaryTableCredentialResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenerateTemporaryTableCredentialResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenerateTemporaryTableCredentialResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9116,52 +5713,15 @@ func (a GetAccountMetastoreAssignmentRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountMetastoreAssignmentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountMetastoreAssignmentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountMetastoreAssignmentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -9196,52 +5756,15 @@ func (a GetAccountMetastoreRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountMetastoreRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountMetastoreRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountMetastoreRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -9278,52 +5801,16 @@ func (a GetAccountStorageCredentialRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountStorageCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountStorageCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountStorageCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "storage_credential_name": o.StorageCredentialName, + }) } // Type implements basetypes.ObjectValuable. @@ -9359,52 +5846,15 @@ func (a GetArtifactAllowlistRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetArtifactAllowlistRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetArtifactAllowlistRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetArtifactAllowlistRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact_type": o.ArtifactType, + }) } // Type implements basetypes.ObjectValuable. @@ -9445,57 +5895,23 @@ func (newState *GetBindingsRequest) SyncEffectiveFieldsDuringRead(existingState // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetBindingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetBindingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetBindingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetBindingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetBindingsRequest) String() string { - return fmt.Sprintf("%#v", o) +// SDK values. +func (a GetBindingsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetBindingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetBindingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetBindingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + }) } // Type implements basetypes.ObjectValuable. @@ -9538,52 +5954,17 @@ func (a GetByAliasRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetByAliasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetByAliasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetByAliasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetByAliasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetByAliasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetByAliasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetByAliasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetByAliasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + }) } // Type implements basetypes.ObjectValuable. @@ -9623,52 +6004,16 @@ func (a GetCatalogRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCatalogRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCatalogRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCatalogRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCatalogRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCatalogRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCatalogRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCatalogRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCatalogRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -9704,52 +6049,15 @@ func (a GetConnectionRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetConnectionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetConnectionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetConnectionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetConnectionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetConnectionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetConnectionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetConnectionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetConnectionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -9784,52 +6092,15 @@ func (a GetCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name_arg": o.NameArg, + }) } // Type implements basetypes.ObjectValuable. @@ -9869,52 +6140,17 @@ func (a GetEffectiveRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEffectiveRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEffectiveRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEffectiveRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "principal": o.Principal, + "securable_type": o.SecurableType, + }) } // Type implements basetypes.ObjectValuable. @@ -9954,52 +6190,16 @@ func (a GetExternalLocationRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExternalLocationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExternalLocationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExternalLocationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -10039,52 +6239,16 @@ func (a GetFunctionRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetFunctionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetFunctionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetFunctionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetFunctionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetFunctionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetFunctionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetFunctionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetFunctionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -10125,52 +6289,17 @@ func (a GetGrantRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetGrantRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetGrantRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetGrantRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetGrantRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetGrantRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetGrantRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetGrantRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetGrantRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "principal": o.Principal, + "securable_type": o.SecurableType, + }) } // Type implements basetypes.ObjectValuable. @@ -10207,52 +6336,15 @@ func (a GetMetastoreRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetMetastoreRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetMetastoreRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetMetastoreRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -10326,52 +6418,33 @@ func (a GetMetastoreSummaryResponse) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetMetastoreSummaryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetMetastoreSummaryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetMetastoreSummaryResponse) 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. @@ -10432,52 +6505,18 @@ func (a GetModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + "include_browse": o.IncludeBrowse, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -10515,52 +6554,15 @@ func (a GetOnlineTableRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetOnlineTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetOnlineTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetOnlineTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -10595,52 +6597,15 @@ func (a GetQualityMonitorRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetQualityMonitorRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetQualityMonitorRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetQualityMonitorRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -10681,52 +6646,17 @@ func (a GetQuotaRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetQuotaRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetQuotaRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetQuotaRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetQuotaRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetQuotaRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetQuotaRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetQuotaRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetQuotaRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parent_full_name": o.ParentFullName, + "parent_securable_type": o.ParentSecurableType, + "quota_name": o.QuotaName, + }) } // Type implements basetypes.ObjectValuable. @@ -10764,52 +6694,15 @@ func (a GetQuotaResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetQuotaResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetQuotaResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetQuotaResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetQuotaResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetQuotaResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetQuotaResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetQuotaResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetQuotaResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "quota_info": o.QuotaInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -10848,52 +6741,16 @@ func (a GetRefreshRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRefreshRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRefreshRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRefreshRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRefreshRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRefreshRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRefreshRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRefreshRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRefreshRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "refresh_id": o.RefreshId, + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -10934,52 +6791,17 @@ func (a GetRegisteredModelRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRegisteredModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "include_aliases": o.IncludeAliases, + "include_browse": o.IncludeBrowse, + }) } // Type implements basetypes.ObjectValuable. @@ -11019,52 +6841,16 @@ func (a GetSchemaRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetSchemaRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetSchemaRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetSchemaRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetSchemaRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetSchemaRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetSchemaRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetSchemaRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetSchemaRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "include_browse": o.IncludeBrowse, + }) } // Type implements basetypes.ObjectValuable. @@ -11093,59 +6879,22 @@ func (newState *GetStorageCredentialRequest) SyncEffectiveFieldsDuringRead(exist // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map -// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStorageCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStorageCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStorageCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -11187,52 +6936,18 @@ func (a GetTableRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11270,52 +6985,15 @@ func (a GetWorkspaceBindingRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceBindingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceBindingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceBindingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -11350,52 +7028,15 @@ func (a ListAccountMetastoreAssignmentsRequest) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountMetastoreAssignmentsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoreAssignmentsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -11431,52 +7072,15 @@ func (a ListAccountMetastoreAssignmentsResponse) GetComplexFieldTypes(ctx contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountMetastoreAssignmentsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountMetastoreAssignmentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountMetastoreAssignmentsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_ids": o.WorkspaceIds, + }) } // Type implements basetypes.ObjectValuable. @@ -11513,52 +7117,15 @@ func (a ListAccountStorageCredentialsRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountStorageCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountStorageCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + }) } // Type implements basetypes.ObjectValuable. @@ -11594,52 +7161,15 @@ func (a ListAccountStorageCredentialsResponse) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountStorageCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountStorageCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountStorageCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "storage_credentials": o.StorageCredentials, + }) } // Type implements basetypes.ObjectValuable. @@ -11689,52 +7219,17 @@ func (a ListCatalogsRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCatalogsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListCatalogsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCatalogsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11776,52 +7271,16 @@ func (a ListCatalogsResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCatalogsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListCatalogsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCatalogsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "catalogs": o.Catalogs, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11866,52 +7325,16 @@ func (a ListConnectionsRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListConnectionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListConnectionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListConnectionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11952,52 +7375,16 @@ func (a ListConnectionsResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListConnectionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListConnectionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListConnectionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "connections": o.Connections, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12043,52 +7430,17 @@ func (a ListCredentialsRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListCredentialsRequest +// only implements ToObjectValue() and Type(). +func (o ListCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "purpose": o.Purpose, + }) } // Type implements basetypes.ObjectValuable. @@ -12129,52 +7481,16 @@ func (a ListCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credentials": o.Credentials, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12222,52 +7538,17 @@ func (a ListExternalLocationsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExternalLocationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExternalLocationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExternalLocationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12309,52 +7590,16 @@ func (a ListExternalLocationsResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExternalLocationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListExternalLocationsResponse +// only implements ToObjectValue() and Type(). +func (o ListExternalLocationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExternalLocationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "external_locations": o.ExternalLocations, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12406,52 +7651,19 @@ func (a ListFunctionsRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFunctionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFunctionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFunctionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12495,52 +7707,16 @@ func (a ListFunctionsResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFunctionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFunctionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFunctionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "functions": o.Functions, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12579,52 +7755,15 @@ func (a ListMetastoresResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListMetastoresResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListMetastoresResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListMetastoresResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastores": o.Metastores, + }) } // Type implements basetypes.ObjectValuable. @@ -12675,52 +7814,18 @@ func (a ListModelVersionsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListModelVersionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListModelVersionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListModelVersionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12762,52 +7867,16 @@ func (a ListModelVersionsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListModelVersionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListModelVersionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListModelVersionsResponse) 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. @@ -12847,52 +7916,16 @@ func (a ListQuotasRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQuotasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQuotasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQuotasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQuotasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQuotasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQuotasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQuotasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQuotasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12933,52 +7966,16 @@ func (a ListQuotasResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQuotasResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQuotasResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQuotasResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQuotasResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQuotasResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQuotasResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQuotasResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQuotasResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "quotas": o.Quotas, + }) } // Type implements basetypes.ObjectValuable. @@ -13016,52 +8013,15 @@ func (a ListRefreshesRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRefreshesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRefreshesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRefreshesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -13123,52 +8083,19 @@ func (a ListRegisteredModelsRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRegisteredModelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRegisteredModelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRegisteredModelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13211,52 +8138,16 @@ func (a ListRegisteredModelsResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRegisteredModelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRegisteredModelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRegisteredModelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) } // Type implements basetypes.ObjectValuable. @@ -13306,52 +8197,18 @@ func (a ListSchemasRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSchemasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSchemasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSchemasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSchemasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSchemasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSchemasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSchemasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSchemasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "include_browse": o.IncludeBrowse, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -13394,52 +8251,16 @@ func (a ListSchemasResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSchemasResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSchemasResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSchemasResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSchemasResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSchemasResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSchemasResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSchemasResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSchemasResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schemas": o.Schemas, + }) } // Type implements basetypes.ObjectValuable. @@ -13484,52 +8305,16 @@ func (a ListStorageCredentialsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListStorageCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListStorageCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListStorageCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -13570,52 +8355,16 @@ func (a ListStorageCredentialsResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListStorageCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListStorageCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListStorageCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "storage_credentials": o.StorageCredentials, + }) } // Type implements basetypes.ObjectValuable. @@ -13671,52 +8420,20 @@ func (a ListSummariesRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSummariesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSummariesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSummariesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSummariesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSummariesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSummariesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSummariesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSummariesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13765,52 +8482,17 @@ func (a ListSystemSchemasRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSystemSchemasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSystemSchemasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSystemSchemasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "metastore_id": o.MetastoreId, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -13852,52 +8534,16 @@ func (a ListSystemSchemasResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSystemSchemasResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSystemSchemasResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSystemSchemasResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schemas": o.Schemas, + }) } // Type implements basetypes.ObjectValuable. @@ -13940,52 +8586,16 @@ func (a ListTableSummariesResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTableSummariesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTableSummariesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTableSummariesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "tables": o.Tables, + }) } // Type implements basetypes.ObjectValuable. @@ -14048,52 +8658,24 @@ func (a ListTablesRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTablesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTablesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTablesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTablesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTablesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTablesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTablesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTablesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -14142,52 +8724,16 @@ func (a ListTablesResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTablesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTablesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTablesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTablesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTablesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTablesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTablesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTablesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "tables": o.Tables, + }) } // Type implements basetypes.ObjectValuable. @@ -14246,52 +8792,19 @@ func (a ListVolumesRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListVolumesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListVolumesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListVolumesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListVolumesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListVolumesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListVolumesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListVolumesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListVolumesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -14335,52 +8848,16 @@ func (a ListVolumesResponseContent) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListVolumesResponseContent{} - -// Equal implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListVolumesResponseContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListVolumesResponseContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "volumes": o.Volumes, + }) } // Type implements basetypes.ObjectValuable. @@ -14421,52 +8898,17 @@ func (a MetastoreAssignment) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o MetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -14532,62 +8974,43 @@ func (newState *MetastoreInfo) SyncEffectiveFieldsDuringRead(existingState Metas } // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MetastoreInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o MetastoreInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MetastoreInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MetastoreInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MetastoreInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MetastoreInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) +// Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry +// the type information of their elements in the Go type system. This function provides a way to +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MetastoreInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MetastoreInfo) 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. @@ -14690,52 +9113,33 @@ func (a ModelVersionInfo) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelVersionInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelVersionInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelVersionInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelVersionInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelVersionInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelVersionInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelVersionInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelVersionInfo) 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. @@ -14798,52 +9202,17 @@ func (a MonitorCronSchedule) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorCronSchedule{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorCronSchedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorCronSchedule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pause_status": o.PauseStatus, + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -14879,52 +9248,15 @@ func (a MonitorDataClassificationConfig) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorDataClassificationConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorDataClassificationConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorDataClassificationConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + }) } // Type implements basetypes.ObjectValuable. @@ -14961,52 +9293,15 @@ func (a MonitorDestination) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorDestination{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorDestination) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorDestination) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorDestination) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorDestination) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorDestination) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorDestination) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorDestination) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "email_addresses": o.EmailAddresses, + }) } // Type implements basetypes.ObjectValuable. @@ -15070,52 +9365,21 @@ func (a MonitorInferenceLog) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorInferenceLog{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorInferenceLog) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorInferenceLog) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15213,52 +9477,32 @@ func (a MonitorInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorInfo) 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. @@ -15349,52 +9593,19 @@ func (a MonitorMetric) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorMetric{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorMetric) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorMetric) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorMetric) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorMetric) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorMetric) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorMetric) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorMetric) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15440,52 +9651,16 @@ func (a MonitorNotifications) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorNotifications{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorNotifications) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorNotifications) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorNotifications) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorNotifications) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorNotifications) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorNotifications) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorNotifications) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "on_failure": o.OnFailure, + "on_new_classification_tag_detected": o.OnNewClassificationTagDetected, + }) } // Type implements basetypes.ObjectValuable. @@ -15537,52 +9712,20 @@ func (a MonitorRefreshInfo) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorRefreshInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorRefreshInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorRefreshInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15623,52 +9766,15 @@ func (a MonitorRefreshListResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorRefreshListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorRefreshListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorRefreshListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "refreshes": o.Refreshes, + }) } // Type implements basetypes.ObjectValuable. @@ -15702,52 +9808,13 @@ func (a MonitorSnapshot) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorSnapshot{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorSnapshot) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorSnapshot) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorSnapshot) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorSnapshot) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorSnapshot) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorSnapshot) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorSnapshot) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -15791,52 +9858,16 @@ func (a MonitorTimeSeries) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MonitorTimeSeries{} - -// Equal implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MonitorTimeSeries) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MonitorTimeSeries) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "granularities": o.Granularities, + "timestamp_col": o.TimestampCol, + }) } // Type implements basetypes.ObjectValuable. @@ -15873,52 +9904,15 @@ func (a NamedTableConstraint) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NamedTableConstraint{} - -// Equal implements basetypes.ObjectValuable. -func (o NamedTableConstraint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NamedTableConstraint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NamedTableConstraint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NamedTableConstraint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NamedTableConstraint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NamedTableConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NamedTableConstraint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -15967,52 +9961,19 @@ func (a OnlineTable) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OnlineTable{} - -// Equal implements basetypes.ObjectValuable. -func (o OnlineTable) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OnlineTable) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OnlineTable) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OnlineTable) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OnlineTable) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OnlineTable) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OnlineTable) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -16080,52 +10041,21 @@ func (a OnlineTableSpec) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OnlineTableSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o OnlineTableSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OnlineTableSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OnlineTableSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OnlineTableSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OnlineTableSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OnlineTableSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -16169,52 +10099,13 @@ func (a OnlineTableSpecContinuousSchedulingPolicy) GetComplexFieldTypes(ctx cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OnlineTableSpecContinuousSchedulingPolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpecContinuousSchedulingPolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OnlineTableSpecContinuousSchedulingPolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -16244,52 +10135,13 @@ func (a OnlineTableSpecTriggeredSchedulingPolicy) GetComplexFieldTypes(ctx conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OnlineTableSpecTriggeredSchedulingPolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OnlineTableSpecTriggeredSchedulingPolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OnlineTableSpecTriggeredSchedulingPolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -16342,52 +10194,20 @@ func (a OnlineTableStatus) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OnlineTableStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o OnlineTableStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OnlineTableStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OnlineTableStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OnlineTableStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OnlineTableStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OnlineTableStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OnlineTableStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -16438,55 +10258,20 @@ func (a PermissionsChange) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{ "add": reflect.TypeOf(types.String{}), "remove": reflect.TypeOf(types.String{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionsChange{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionsChange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionsChange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionsChange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionsChange) String() string { - return fmt.Sprintf("%#v", o) + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionsChange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionsChange) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionsChange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "add": o.Add, + "principal": o.Principal, + "remove": o.Remove, + }) } // Type implements basetypes.ObjectValuable. @@ -16528,52 +10313,15 @@ func (a PermissionsList) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionsList{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionsList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionsList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionsList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionsList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionsList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionsList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionsList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + }) } // Type implements basetypes.ObjectValuable. @@ -16620,52 +10368,19 @@ func (a PipelineProgress) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineProgress{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineProgress) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineProgress) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineProgress) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineProgress) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineProgress) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineProgress) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineProgress) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -16707,52 +10422,16 @@ func (a PrimaryKeyConstraint) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PrimaryKeyConstraint{} - -// Equal implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PrimaryKeyConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PrimaryKeyConstraint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "child_columns": o.ChildColumns, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -16793,52 +10472,16 @@ func (a PrivilegeAssignment) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PrivilegeAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PrivilegeAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) } // Type implements basetypes.ObjectValuable. @@ -16875,52 +10518,15 @@ func (a ProvisioningInfo) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProvisioningInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ProvisioningInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProvisioningInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProvisioningInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProvisioningInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProvisioningInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProvisioningInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProvisioningInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -16959,52 +10565,15 @@ func (a ProvisioningStatus) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProvisioningStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o ProvisioningStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProvisioningStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProvisioningStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProvisioningStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProvisioningStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProvisioningStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProvisioningStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "initial_pipeline_sync_progress": o.InitialPipelineSyncProgress, + }) } // Type implements basetypes.ObjectValuable. @@ -17051,52 +10620,20 @@ func (a QuotaInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QuotaInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o QuotaInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QuotaInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QuotaInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QuotaInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QuotaInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QuotaInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QuotaInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -17141,52 +10678,17 @@ func (a R2Credentials) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = R2Credentials{} - -// Equal implements basetypes.ObjectValuable. -func (o R2Credentials) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o R2Credentials) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o R2Credentials) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o R2Credentials) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o R2Credentials) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o R2Credentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o R2Credentials) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_key_id": o.AccessKeyId, + "secret_access_key": o.SecretAccessKey, + "session_token": o.SessionToken, + }) } // Type implements basetypes.ObjectValuable. @@ -17226,52 +10728,16 @@ func (a ReadVolumeRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReadVolumeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReadVolumeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReadVolumeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_browse": o.IncludeBrowse, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -17309,52 +10775,16 @@ func (a RegenerateDashboardRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegenerateDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegenerateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegenerateDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_name": o.TableName, + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -17391,52 +10821,16 @@ func (a RegenerateDashboardResponse) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegenerateDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegenerateDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegenerateDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "parent_folder": o.ParentFolder, + }) } // Type implements basetypes.ObjectValuable. @@ -17474,52 +10868,16 @@ func (a RegisteredModelAlias) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelAlias{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAlias) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelAlias) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alias_name": o.AliasName, + "version_num": o.VersionNum, + }) } // Type implements basetypes.ObjectValuable. @@ -17587,52 +10945,28 @@ func (a RegisteredModelInfo) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -17682,52 +11016,15 @@ func (a RunRefreshRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunRefreshRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RunRefreshRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunRefreshRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunRefreshRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunRefreshRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunRefreshRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunRefreshRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunRefreshRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_name": o.TableName, + }) } // Type implements basetypes.ObjectValuable. @@ -17801,52 +11098,32 @@ func (a SchemaInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SchemaInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o SchemaInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SchemaInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SchemaInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SchemaInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SchemaInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SchemaInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SchemaInfo) 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. @@ -17905,52 +11182,16 @@ func (a SetArtifactAllowlist) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetArtifactAllowlist{} - -// Equal implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetArtifactAllowlist) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetArtifactAllowlist) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact_matchers": o.ArtifactMatchers, + "artifact_type": o.ArtifactType, + }) } // Type implements basetypes.ObjectValuable. @@ -17991,52 +11232,17 @@ func (a SetRegisteredModelAliasRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetRegisteredModelAliasRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetRegisteredModelAliasRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetRegisteredModelAliasRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alias": o.Alias, + "full_name": o.FullName, + "version_num": o.VersionNum, + }) } // Type implements basetypes.ObjectValuable. @@ -18076,52 +11282,16 @@ func (a SseEncryptionDetails) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SseEncryptionDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SseEncryptionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SseEncryptionDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "algorithm": o.Algorithm, + "aws_kms_key_arn": o.AwsKmsKeyArn, + }) } // Type implements basetypes.ObjectValuable. @@ -18191,58 +11361,38 @@ func (a StorageCredentialInfo) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{ "aws_iam_role": reflect.TypeOf(AwsIamRoleResponse{}), "azure_managed_identity": reflect.TypeOf(AzureManagedIdentityResponse{}), - "azure_service_principal": reflect.TypeOf(AzureServicePrincipal{}), - "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken{}), - "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountResponse{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StorageCredentialInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) + "azure_service_principal": reflect.TypeOf(AzureServicePrincipal{}), + "cloudflare_api_token": reflect.TypeOf(CloudflareApiToken{}), + "databricks_gcp_service_account": reflect.TypeOf(DatabricksGcpServiceAccountResponse{}), + } } -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StorageCredentialInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StorageCredentialInfo) 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. @@ -18306,52 +11456,16 @@ func (a SystemSchemaInfo) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SystemSchemaInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SystemSchemaInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SystemSchemaInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "schema": o.Schema, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -18396,52 +11510,17 @@ func (a TableConstraint) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableConstraint{} - -// Equal implements basetypes.ObjectValuable. -func (o TableConstraint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableConstraint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableConstraint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableConstraint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableConstraint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableConstraint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableConstraint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "foreign_key_constraint": o.ForeignKeyConstraint, + "named_table_constraint": o.NamedTableConstraint, + "primary_key_constraint": o.PrimaryKeyConstraint, + }) } // Type implements basetypes.ObjectValuable. @@ -18485,52 +11564,15 @@ func (a TableDependency) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableDependency{} - -// Equal implements basetypes.ObjectValuable. -func (o TableDependency) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableDependency) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableDependency) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableDependency) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableDependency) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableDependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableDependency) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_full_name": o.TableFullName, + }) } // Type implements basetypes.ObjectValuable. @@ -18564,52 +11606,15 @@ func (a TableExistsResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableExistsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o TableExistsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableExistsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableExistsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableExistsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableExistsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableExistsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableExistsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "table_exists": o.TableExists, + }) } // Type implements basetypes.ObjectValuable. @@ -18727,52 +11732,46 @@ func (a TableInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o TableInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableInfo) 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. @@ -18859,52 +11858,16 @@ func (a TableRowFilter) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableRowFilter{} - -// Equal implements basetypes.ObjectValuable. -func (o TableRowFilter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableRowFilter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableRowFilter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableRowFilter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableRowFilter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableRowFilter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableRowFilter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "function_name": o.FunctionName, + "input_column_names": o.InputColumnNames, + }) } // Type implements basetypes.ObjectValuable. @@ -18943,52 +11906,16 @@ func (a TableSummary) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableSummary{} - -// Equal implements basetypes.ObjectValuable. -func (o TableSummary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableSummary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableSummary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableSummary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableSummary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableSummary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "table_type": o.TableType, + }) } // Type implements basetypes.ObjectValuable. @@ -19034,52 +11961,17 @@ func (a TemporaryCredentials) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TemporaryCredentials{} - -// Equal implements basetypes.ObjectValuable. -func (o TemporaryCredentials) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TemporaryCredentials) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TemporaryCredentials) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TemporaryCredentials) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TemporaryCredentials) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TemporaryCredentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TemporaryCredentials) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_temp_credentials": o.AwsTempCredentials, + "azure_aad": o.AzureAad, + "expiration_time": o.ExpirationTime, + }) } // Type implements basetypes.ObjectValuable. @@ -19130,52 +12022,17 @@ func (a TriggeredUpdateStatus) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TriggeredUpdateStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TriggeredUpdateStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TriggeredUpdateStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "last_processed_commit_version": o.LastProcessedCommitVersion, + "timestamp": o.Timestamp, + "triggered_update_progress": o.TriggeredUpdateProgress, + }) } // Type implements basetypes.ObjectValuable. @@ -19216,52 +12073,16 @@ func (a UnassignRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnassignRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UnassignRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnassignRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnassignRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnassignRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnassignRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnassignRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnassignRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -19294,52 +12115,13 @@ func (a UnassignResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnassignResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UnassignResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnassignResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnassignResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnassignResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnassignResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnassignResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnassignResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -19369,52 +12151,13 @@ func (a UpdateAssignmentResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAssignmentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAssignmentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAssignmentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -19462,52 +12205,21 @@ func (a UpdateCatalog) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCatalog{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCatalog) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCatalog) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCatalog) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCatalog) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCatalog) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCatalog) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCatalog) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -19557,52 +12269,18 @@ func (a UpdateConnection) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateConnection{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateConnection) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateConnection) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateConnection) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateConnection) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateConnection) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateConnection) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateConnection) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "new_name": o.NewName, + "options": o.Options, + "owner": o.Owner, + }) } // Type implements basetypes.ObjectValuable. @@ -19670,52 +12348,25 @@ func (a UpdateCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_iam_role": o.AwsIamRole, + "azure_managed_identity": o.AzureManagedIdentity, + "azure_service_principal": o.AzureServicePrincipal, + "comment": o.Comment, + "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. @@ -19795,52 +12446,27 @@ func (a UpdateExternalLocation) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExternalLocation{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExternalLocation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExternalLocation) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -19891,52 +12517,16 @@ func (a UpdateFunction) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateFunction{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateFunction) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateFunction) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateFunction) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateFunction) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateFunction) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateFunction) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateFunction) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "owner": o.Owner, + }) } // Type implements basetypes.ObjectValuable. @@ -19987,52 +12577,22 @@ func (a UpdateMetastore) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateMetastore{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateMetastore) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateMetastore) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateMetastore) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateMetastore) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateMetastore) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateMetastore) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateMetastore) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -20071,60 +12631,25 @@ func (newState *UpdateMetastoreAssignment) SyncEffectiveFieldsDuringRead(existin // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateMetastoreAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateMetastoreAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateMetastoreAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default_catalog_name": o.DefaultCatalogName, + "metastore_id": o.MetastoreId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -20164,52 +12689,17 @@ func (a UpdateModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "full_name": o.FullName, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -20285,52 +12775,26 @@ func (a UpdateMonitor) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateMonitor{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateMonitor) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateMonitor) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateMonitor) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateMonitor) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateMonitor) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateMonitor) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateMonitor) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -20397,52 +12861,17 @@ func (a UpdatePermissions) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "changes": o.Changes, + "full_name": o.FullName, + "securable_type": o.SecurableType, + }) } // Type implements basetypes.ObjectValuable. @@ -20486,52 +12915,18 @@ func (a UpdateRegisteredModelRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRegisteredModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRegisteredModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRegisteredModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "full_name": o.FullName, + "new_name": o.NewName, + "owner": o.Owner, + }) } // Type implements basetypes.ObjectValuable. @@ -20566,52 +12961,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -20656,52 +13012,20 @@ func (a UpdateSchema) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateSchema{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateSchema) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateSchema) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateSchema) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateSchema) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateSchema) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateSchema) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateSchema) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -20774,52 +13098,27 @@ func (a UpdateStorageCredential) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateStorageCredential{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateStorageCredential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateStorageCredential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -20878,52 +13177,16 @@ func (a UpdateTableRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateTableRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateTableRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateTableRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateTableRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateTableRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateTableRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateTableRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateTableRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_name": o.FullName, + "owner": o.Owner, + }) } // Type implements basetypes.ObjectValuable. @@ -20964,52 +13227,18 @@ func (a UpdateVolumeRequestContent) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateVolumeRequestContent{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateVolumeRequestContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateVolumeRequestContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "new_name": o.NewName, + "owner": o.Owner, + }) } // Type implements basetypes.ObjectValuable. @@ -21053,52 +13282,17 @@ func (a UpdateWorkspaceBindings) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateWorkspaceBindings{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceBindings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "assign_workspaces": o.AssignWorkspaces, + "name": o.Name, + "unassign_workspaces": o.UnassignWorkspaces, + }) } // Type implements basetypes.ObjectValuable. @@ -21147,52 +13341,18 @@ func (a UpdateWorkspaceBindingsParameters) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateWorkspaceBindingsParameters{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceBindingsParameters) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceBindingsParameters) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "add": o.Add, + "remove": o.Remove, + "securable_name": o.SecurableName, + "securable_type": o.SecurableType, + }) } // Type implements basetypes.ObjectValuable. @@ -21253,52 +13413,21 @@ func (a ValidateCredentialRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ValidateCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ValidateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ValidateCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -21347,52 +13476,16 @@ func (a ValidateCredentialResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ValidateCredentialResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ValidateCredentialResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ValidateCredentialResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "isDir": o.IsDir, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -21451,52 +13544,23 @@ func (a ValidateStorageCredential) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ValidateStorageCredential{} - -// Equal implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ValidateStorageCredential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ValidateStorageCredential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -21552,52 +13616,16 @@ func (a ValidateStorageCredentialResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ValidateStorageCredentialResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ValidateStorageCredentialResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ValidateStorageCredentialResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "isDir": o.IsDir, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -21638,52 +13666,17 @@ func (a ValidationResult) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ValidationResult{} - -// Equal implements basetypes.ObjectValuable. -func (o ValidationResult) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ValidationResult) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ValidationResult) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ValidationResult) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ValidationResult) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ValidationResult) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ValidationResult) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "operation": o.Operation, + "result": o.Result, + }) } // Type implements basetypes.ObjectValuable. @@ -21755,52 +13748,31 @@ func (a VolumeInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = VolumeInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o VolumeInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o VolumeInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o VolumeInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o VolumeInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o VolumeInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o VolumeInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o VolumeInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -21853,52 +13825,16 @@ func (a WorkspaceBinding) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceBinding{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceBinding) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceBinding) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceBinding) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceBinding) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceBinding) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceBinding) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceBinding) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "binding_type": o.BindingType, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -21940,52 +13876,16 @@ func (a WorkspaceBindingsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceBindingsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceBindingsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceBindingsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bindings": o.Bindings, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/compute_tf/model.go b/internal/service/compute_tf/model.go index 416d83324..08e275f9e 100755 --- a/internal/service/compute_tf/model.go +++ b/internal/service/compute_tf/model.go @@ -12,15 +12,11 @@ package compute_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AddInstanceProfile struct { @@ -69,52 +65,18 @@ func (a AddInstanceProfile) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddInstanceProfile{} - -// Equal implements basetypes.ObjectValuable. -func (o AddInstanceProfile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddInstanceProfile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddInstanceProfile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddInstanceProfile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddInstanceProfile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddInstanceProfile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddInstanceProfile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -149,52 +111,13 @@ func (a AddResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AddResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -227,52 +150,15 @@ func (a Adlsgen2Info) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Adlsgen2Info{} - -// Equal implements basetypes.ObjectValuable. -func (o Adlsgen2Info) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Adlsgen2Info) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Adlsgen2Info) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Adlsgen2Info) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Adlsgen2Info) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Adlsgen2Info) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Adlsgen2Info) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination": o.Destination, + }) } // Type implements basetypes.ObjectValuable. @@ -312,52 +198,16 @@ func (a AutoScale) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AutoScale{} - -// Equal implements basetypes.ObjectValuable. -func (o AutoScale) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AutoScale) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AutoScale) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AutoScale) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AutoScale) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AutoScale) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AutoScale) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_workers": o.MaxWorkers, + "min_workers": o.MinWorkers, + }) } // Type implements basetypes.ObjectValuable. @@ -473,52 +323,24 @@ func (a AwsAttributes) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -584,52 +406,18 @@ func (a AzureAttributes) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -671,52 +459,17 @@ func (a CancelCommand) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelCommand{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelCommand) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelCommand) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelCommand) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelCommand) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelCommand) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelCommand) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelCommand) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "commandId": o.CommandId, + "contextId": o.ContextId, + }) } // Type implements basetypes.ObjectValuable. @@ -750,52 +503,13 @@ func (a CancelResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -829,52 +543,16 @@ func (a ChangeClusterOwner) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ChangeClusterOwner{} - -// Equal implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ChangeClusterOwner) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ChangeClusterOwner) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "owner_username": o.OwnerUsername, + }) } // Type implements basetypes.ObjectValuable. @@ -907,52 +585,13 @@ func (a ChangeClusterOwnerResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ChangeClusterOwnerResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ChangeClusterOwnerResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ChangeClusterOwnerResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -986,52 +625,16 @@ func (a ClientsTypes) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClientsTypes{} - -// Equal implements basetypes.ObjectValuable. -func (o ClientsTypes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClientsTypes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClientsTypes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClientsTypes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClientsTypes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClientsTypes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClientsTypes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "jobs": o.Jobs, + "notebooks": o.Notebooks, + }) } // Type implements basetypes.ObjectValuable. @@ -1066,52 +669,15 @@ func (a CloneCluster) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CloneCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o CloneCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CloneCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CloneCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CloneCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CloneCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CloneCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CloneCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "source_cluster_id": o.SourceClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -1146,52 +712,15 @@ func (a CloudProviderNodeInfo) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CloudProviderNodeInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CloudProviderNodeInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CloudProviderNodeInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -1233,52 +762,18 @@ func (a ClusterAccessControlRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1325,52 +820,19 @@ func (a ClusterAccessControlResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1550,52 +1012,38 @@ func (a ClusterAttributes) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAttributes) 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. @@ -1684,52 +1132,17 @@ func (a ClusterCompliance) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterCompliance{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterCompliance) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterCompliance) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterCompliance) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterCompliance) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterCompliance) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterCompliance) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterCompliance) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) } // Type implements basetypes.ObjectValuable. @@ -1997,52 +1410,59 @@ func (a ClusterDetails) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterDetails) 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. @@ -2169,52 +1589,19 @@ func (a ClusterEvent) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterEvent{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterEvent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterEvent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterEvent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterEvent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterEvent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterEvent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterEvent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2260,52 +1647,16 @@ func (a ClusterLibraryStatuses) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterLibraryStatuses{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterLibraryStatuses) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterLibraryStatuses) 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. @@ -2352,52 +1703,16 @@ func (a ClusterLogConf) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterLogConf{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterLogConf) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterLogConf) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterLogConf) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterLogConf) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterLogConf) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterLogConf) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterLogConf) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dbfs": o.Dbfs, + "s3": o.S3, + }) } // Type implements basetypes.ObjectValuable. @@ -2441,52 +1756,17 @@ func (a ClusterPermission) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -2529,52 +1809,17 @@ func (a ClusterPermissions) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -2613,52 +1858,16 @@ func (a ClusterPermissionsDescription) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -2696,52 +1905,16 @@ func (a ClusterPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -2784,52 +1957,18 @@ func (a ClusterPolicyAccessControlRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2876,52 +2015,19 @@ func (a ClusterPolicyAccessControlResponse) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2966,52 +2072,17 @@ func (a ClusterPolicyPermission) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -3054,52 +2125,17 @@ func (a ClusterPolicyPermissions) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -3138,52 +2174,16 @@ func (a ClusterPolicyPermissionsDescription) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -3221,52 +2221,16 @@ func (a ClusterPolicyPermissionsRequest) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterPolicyPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterPolicyPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterPolicyPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "cluster_policy_id": o.ClusterPolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -3315,52 +2279,17 @@ func (a ClusterSettingsChange) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterSettingsChange{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterSettingsChange) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterSettingsChange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "field": o.Field, + "new_value": o.NewValue, + "previous_value": o.PreviousValue, + }) } // Type implements basetypes.ObjectValuable. @@ -3411,52 +2340,16 @@ func (a ClusterSize) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterSize{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterSize) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterSize) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterSize) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterSize) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterSize) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterSize) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterSize) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "autoscale": o.Autoscale, + "num_workers": o.NumWorkers, + }) } // Type implements basetypes.ObjectValuable. @@ -3653,52 +2546,41 @@ func (a ClusterSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterSpec) 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. @@ -3783,52 +2665,15 @@ func (a ClusterStatus) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -3868,52 +2713,18 @@ func (a Command) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Command{} - -// Equal implements basetypes.ObjectValuable. -func (o Command) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Command) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Command) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Command) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Command) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Command) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Command) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "command": o.Command, + "contextId": o.ContextId, + "language": o.Language, + }) } // Type implements basetypes.ObjectValuable. @@ -3954,52 +2765,17 @@ func (a CommandStatusRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CommandStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CommandStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CommandStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CommandStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CommandStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CommandStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CommandStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CommandStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "commandId": o.CommandId, + "contextId": o.ContextId, + }) } // Type implements basetypes.ObjectValuable. @@ -4040,52 +2816,17 @@ func (a CommandStatusResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CommandStatusResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CommandStatusResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CommandStatusResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CommandStatusResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CommandStatusResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CommandStatusResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CommandStatusResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CommandStatusResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "results": o.Results, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -4125,52 +2866,16 @@ func (a ContextStatusRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ContextStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ContextStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ContextStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ContextStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ContextStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ContextStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ContextStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ContextStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "contextId": o.ContextId, + }) } // Type implements basetypes.ObjectValuable. @@ -4206,52 +2911,16 @@ func (a ContextStatusResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ContextStatusResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ContextStatusResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ContextStatusResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ContextStatusResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ContextStatusResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ContextStatusResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ContextStatusResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ContextStatusResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -4450,52 +3119,42 @@ func (a CreateCluster) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCluster) 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. @@ -4581,52 +3240,15 @@ func (a CreateClusterResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -4662,52 +3284,16 @@ func (a CreateContext) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateContext{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateContext) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateContext) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateContext) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateContext) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateContext) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateContext) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateContext) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "language": o.Language, + }) } // Type implements basetypes.ObjectValuable. @@ -4802,52 +3388,27 @@ func (a CreateInstancePool) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateInstancePool{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateInstancePool) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateInstancePool) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateInstancePool) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateInstancePool) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateInstancePool) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateInstancePool) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateInstancePool) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4907,52 +3468,15 @@ func (a CreateInstancePoolResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateInstancePoolResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateInstancePoolResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateInstancePoolResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -5019,52 +3543,21 @@ func (a CreatePolicy) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5106,52 +3599,15 @@ func (a CreatePolicyResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePolicyResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePolicyResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePolicyResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -5185,52 +3641,15 @@ func (a CreateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "script_id": o.ScriptId, + }) } // Type implements basetypes.ObjectValuable. @@ -5263,52 +3682,15 @@ func (a Created) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Created{} - -// Equal implements basetypes.ObjectValuable. -func (o Created) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Created) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Created) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Created) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Created) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Created) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Created) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -5348,52 +3730,18 @@ func (a DataPlaneEventDetails) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataPlaneEventDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataPlaneEventDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataPlaneEventDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "event_type": o.EventType, + "executor_failures": o.ExecutorFailures, + "host_id": o.HostId, + "timestamp": o.Timestamp, + }) } // Type implements basetypes.ObjectValuable. @@ -5430,52 +3778,15 @@ func (a DbfsStorageInfo) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DbfsStorageInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DbfsStorageInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DbfsStorageInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination": o.Destination, + }) } // Type implements basetypes.ObjectValuable. @@ -5509,52 +3820,15 @@ func (a DeleteCluster) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -5586,52 +3860,13 @@ func (a DeleteClusterResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5664,52 +3899,15 @@ func (a DeleteGlobalInitScriptRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteGlobalInitScriptRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteGlobalInitScriptRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteGlobalInitScriptRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "script_id": o.ScriptId, + }) } // Type implements basetypes.ObjectValuable. @@ -5743,52 +3941,15 @@ func (a DeleteInstancePool) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteInstancePool{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteInstancePool) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteInstancePool) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteInstancePool) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteInstancePool) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteInstancePool) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteInstancePool) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteInstancePool) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -5820,52 +3981,13 @@ func (a DeleteInstancePoolResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteInstancePoolResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteInstancePoolResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteInstancePoolResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5897,52 +4019,15 @@ func (a DeletePolicy) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -5974,52 +4059,13 @@ func (a DeletePolicyResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePolicyResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePolicyResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePolicyResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -6049,59 +4095,20 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o DeleteResponse) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{}, - } +// Type implements basetypes.ObjectValuable. +func (o DeleteResponse) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{}, + } } type DestroyContext struct { @@ -6127,52 +4134,16 @@ func (a DestroyContext) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DestroyContext{} - -// Equal implements basetypes.ObjectValuable. -func (o DestroyContext) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DestroyContext) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DestroyContext) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DestroyContext) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DestroyContext) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DestroyContext) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DestroyContext) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusterId": o.ClusterId, + "contextId": o.ContextId, + }) } // Type implements basetypes.ObjectValuable. @@ -6205,52 +4176,13 @@ func (a DestroyResponse) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DestroyResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DestroyResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DestroyResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DestroyResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DestroyResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DestroyResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DestroyResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DestroyResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -6314,52 +4246,19 @@ func (a DiskSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DiskSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o DiskSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DiskSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DiskSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DiskSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DiskSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DiskSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DiskSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6400,52 +4299,16 @@ func (a DiskType) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DiskType{} - -// Equal implements basetypes.ObjectValuable. -func (o DiskType) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DiskType) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DiskType) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DiskType) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DiskType) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DiskType) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DiskType) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "azure_disk_volume_type": o.AzureDiskVolumeType, + "ebs_volume_type": o.EbsVolumeType, + }) } // Type implements basetypes.ObjectValuable. @@ -6482,52 +4345,16 @@ func (a DockerBasicAuth) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DockerBasicAuth{} - -// Equal implements basetypes.ObjectValuable. -func (o DockerBasicAuth) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DockerBasicAuth) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DockerBasicAuth) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DockerBasicAuth) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DockerBasicAuth) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DockerBasicAuth) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DockerBasicAuth) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "password": o.Password, + "username": o.Username, + }) } // Type implements basetypes.ObjectValuable. @@ -6565,52 +4392,16 @@ func (a DockerImage) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DockerImage{} - -// Equal implements basetypes.ObjectValuable. -func (o DockerImage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DockerImage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DockerImage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DockerImage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DockerImage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DockerImage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DockerImage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "basic_auth": o.BasicAuth, + "url": o.Url, + }) } // Type implements basetypes.ObjectValuable. @@ -6809,52 +4600,42 @@ func (a EditCluster) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o EditCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditCluster) 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. @@ -6937,52 +4718,13 @@ func (a EditClusterResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7045,52 +4787,21 @@ func (a EditInstancePool) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditInstancePool{} - -// Equal implements basetypes.ObjectValuable. -func (o EditInstancePool) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditInstancePool) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditInstancePool) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditInstancePool) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditInstancePool) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditInstancePool) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditInstancePool) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7130,52 +4841,13 @@ func (a EditInstancePoolResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditInstancePoolResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditInstancePoolResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditInstancePoolResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7242,52 +4914,22 @@ func (a EditPolicy) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditPolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o EditPolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditPolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditPolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditPolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditPolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditPolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditPolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7328,52 +4970,13 @@ func (a EditPolicyResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditPolicyResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditPolicyResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditPolicyResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditPolicyResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditPolicyResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditPolicyResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditPolicyResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditPolicyResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7403,52 +5006,13 @@ func (a EditResponse) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7483,52 +5047,16 @@ func (a EnforceClusterComplianceRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnforceClusterComplianceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnforceClusterComplianceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "validate_only": o.ValidateOnly, + }) } // Type implements basetypes.ObjectValuable. @@ -7569,52 +5097,16 @@ func (a EnforceClusterComplianceResponse) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnforceClusterComplianceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnforceClusterComplianceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnforceClusterComplianceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "changes": o.Changes, + "has_changes": o.HasChanges, + }) } // Type implements basetypes.ObjectValuable. @@ -7666,52 +5158,16 @@ func (a Environment) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Environment{} - -// Equal implements basetypes.ObjectValuable. -func (o Environment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Environment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Environment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Environment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Environment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Environment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Environment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "client": o.Client, + "dependencies": o.Dependencies, + }) } // Type implements basetypes.ObjectValuable. @@ -7801,52 +5257,34 @@ func (a EventDetails) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EventDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o EventDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EventDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EventDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EventDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EventDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EventDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EventDetails) 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. @@ -7940,52 +5378,20 @@ func (a GcpAttributes) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8024,52 +5430,15 @@ func (a GcsStorageInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcsStorageInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o GcsStorageInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcsStorageInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcsStorageInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcsStorageInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcsStorageInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcsStorageInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcsStorageInfo) 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. @@ -8104,52 +5473,15 @@ func (a GetClusterComplianceRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterComplianceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterComplianceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterComplianceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -8192,52 +5524,16 @@ func (a GetClusterComplianceResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterComplianceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterComplianceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterComplianceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) } // Type implements basetypes.ObjectValuable. @@ -8275,52 +5571,15 @@ func (a GetClusterPermissionLevelsRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -8356,52 +5615,15 @@ func (a GetClusterPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -8438,52 +5660,15 @@ func (a GetClusterPermissionsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -8518,52 +5703,15 @@ func (a GetClusterPolicyPermissionLevelsRequest) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPolicyPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_policy_id": o.ClusterPolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -8599,52 +5747,15 @@ func (a GetClusterPolicyPermissionLevelsResponse) GetComplexFieldTypes(ctx conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPolicyPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -8681,52 +5792,15 @@ func (a GetClusterPolicyPermissionsRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPolicyPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_policy_id": o.ClusterPolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -8761,52 +5835,15 @@ func (a GetClusterPolicyRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterPolicyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterPolicyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterPolicyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -8841,52 +5878,15 @@ func (a GetClusterRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetClusterRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetClusterRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetClusterRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetClusterRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetClusterRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetClusterRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetClusterRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetClusterRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -8940,52 +5940,21 @@ func (a GetEvents) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEvents{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEvents) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEvents) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEvents) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEvents) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEvents) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEvents) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEvents) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9036,52 +6005,17 @@ func (a GetEventsResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEventsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEventsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEventsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEventsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEventsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEventsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEventsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEventsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "events": o.Events, + "next_page": o.NextPage, + "total_count": o.TotalCount, + }) } // Type implements basetypes.ObjectValuable. @@ -9122,52 +6056,15 @@ func (a GetGlobalInitScriptRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetGlobalInitScriptRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetGlobalInitScriptRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetGlobalInitScriptRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "script_id": o.ScriptId, + }) } // Type implements basetypes.ObjectValuable. @@ -9283,52 +6180,32 @@ func (a GetInstancePool) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetInstancePool{} - -// Equal implements basetypes.ObjectValuable. -func (o GetInstancePool) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetInstancePool) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetInstancePool) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetInstancePool) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetInstancePool) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetInstancePool) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetInstancePool) 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. @@ -9400,52 +6277,15 @@ func (a GetInstancePoolPermissionLevelsRequest) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetInstancePoolPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -9481,52 +6321,15 @@ func (a GetInstancePoolPermissionLevelsResponse) GetComplexFieldTypes(ctx contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetInstancePoolPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -9563,52 +6366,15 @@ func (a GetInstancePoolPermissionsRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetInstancePoolPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetInstancePoolPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -9643,52 +6409,15 @@ func (a GetInstancePoolRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetInstancePoolRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetInstancePoolRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetInstancePoolRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -9726,61 +6455,25 @@ func (a GetPolicyFamilyRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPolicyFamilyRequest{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPolicyFamilyRequest) 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, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o GetPolicyFamilyRequest) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "policy_family_id": types.StringType, - "version": types.Int64Type, - }, +// Type implements basetypes.ObjectValuable. +func (o GetPolicyFamilyRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "policy_family_id": types.StringType, + "version": types.Int64Type, + }, } } @@ -9808,52 +6501,15 @@ func (a GetSparkVersionsResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetSparkVersionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetSparkVersionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetSparkVersionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "versions": o.Versions, + }) } // Type implements basetypes.ObjectValuable. @@ -9905,52 +6561,18 @@ func (a GlobalInitScriptCreateRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GlobalInitScriptCreateRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptCreateRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptCreateRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script": o.Script, + }) } // Type implements basetypes.ObjectValuable. @@ -10004,52 +6626,22 @@ func (a GlobalInitScriptDetails) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GlobalInitScriptDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10109,52 +6701,23 @@ func (a GlobalInitScriptDetailsWithContent) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GlobalInitScriptDetailsWithContent{} - -// Equal implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptDetailsWithContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptDetailsWithContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10215,52 +6778,19 @@ func (a GlobalInitScriptUpdateRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GlobalInitScriptUpdateRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GlobalInitScriptUpdateRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GlobalInitScriptUpdateRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + "name": o.Name, + "position": o.Position, + "script": o.Script, + "script_id": o.ScriptId, + }) } // Type implements basetypes.ObjectValuable. @@ -10305,52 +6835,17 @@ func (a InitScriptEventDetails) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InitScriptEventDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InitScriptEventDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InitScriptEventDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster": o.Cluster, + "global": o.Global, + "reported_for_node": o.ReportedForNode, + }) } // Type implements basetypes.ObjectValuable. @@ -10394,52 +6889,17 @@ func (a InitScriptExecutionDetails) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InitScriptExecutionDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InitScriptExecutionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InitScriptExecutionDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error_message": o.ErrorMessage, + "execution_duration_seconds": o.ExecutionDurationSeconds, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -10506,52 +6966,21 @@ func (a InitScriptInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InitScriptInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o InitScriptInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InitScriptInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InitScriptInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InitScriptInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InitScriptInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InitScriptInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InitScriptInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10610,52 +7039,16 @@ func (a InitScriptInfoAndExecutionDetails) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InitScriptInfoAndExecutionDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InitScriptInfoAndExecutionDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InitScriptInfoAndExecutionDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "execution_details": o.ExecutionDetails, + "script": o.Script, + }) } // Type implements basetypes.ObjectValuable. @@ -10698,52 +7091,16 @@ func (a InstallLibraries) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstallLibraries{} - -// Equal implements basetypes.ObjectValuable. -func (o InstallLibraries) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstallLibraries) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstallLibraries) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstallLibraries) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstallLibraries) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstallLibraries) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstallLibraries) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "libraries": o.Libraries, + }) } // Type implements basetypes.ObjectValuable. @@ -10778,52 +7135,13 @@ func (a InstallLibrariesResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstallLibrariesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstallLibrariesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstallLibrariesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10861,52 +7179,18 @@ func (a InstancePoolAccessControlRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10953,52 +7237,19 @@ func (a InstancePoolAccessControlResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11120,52 +7371,32 @@ func (a InstancePoolAndStats) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolAndStats{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolAndStats) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAndStats) 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. @@ -11263,52 +7494,17 @@ func (a InstancePoolAwsAttributes) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolAwsAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAwsAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolAwsAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "availability": o.Availability, + "spot_bid_price_percent": o.SpotBidPricePercent, + "zone_id": o.ZoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -11350,52 +7546,16 @@ func (a InstancePoolAzureAttributes) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolAzureAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolAzureAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolAzureAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "availability": o.Availability, + "spot_bid_max_price": o.SpotBidMaxPrice, + }) } // Type implements basetypes.ObjectValuable. @@ -11456,52 +7616,17 @@ func (a InstancePoolGcpAttributes) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolGcpAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolGcpAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolGcpAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "gcp_availability": o.GcpAvailability, + "local_ssd_count": o.LocalSsdCount, + "zone_id": o.ZoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -11542,64 +7667,29 @@ func (a InstancePoolPermission) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolPermission{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermission) 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, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o InstancePoolPermission) 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, - }, +// Type implements basetypes.ObjectValuable. +func (o InstancePoolPermission) 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, + }, } } @@ -11630,52 +7720,17 @@ func (a InstancePoolPermissions) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -11714,52 +7769,16 @@ func (a InstancePoolPermissionsDescription) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -11797,52 +7816,16 @@ func (a InstancePoolPermissionsRequest) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "instance_pool_id": o.InstancePoolId, + }) } // Type implements basetypes.ObjectValuable. @@ -11885,52 +7868,18 @@ func (a InstancePoolStats) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolStats{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolStats) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolStats) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolStats) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolStats) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolStats) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolStats) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolStats) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11972,52 +7921,15 @@ func (a InstancePoolStatus) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstancePoolStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o InstancePoolStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstancePoolStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstancePoolStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstancePoolStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstancePoolStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstancePoolStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstancePoolStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pending_instance_errors": o.PendingInstanceErrors, + }) } // Type implements basetypes.ObjectValuable. @@ -12069,52 +7981,17 @@ func (a InstanceProfile) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstanceProfile{} - -// Equal implements basetypes.ObjectValuable. -func (o InstanceProfile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstanceProfile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstanceProfile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstanceProfile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstanceProfile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstanceProfile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstanceProfile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "iam_role_arn": o.IamRoleArn, + "instance_profile_arn": o.InstanceProfileArn, + "is_meta_instance_profile": o.IsMetaInstanceProfile, + }) } // Type implements basetypes.ObjectValuable. @@ -12185,52 +8062,21 @@ func (a Library) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Library{} - -// Equal implements basetypes.ObjectValuable. -func (o Library) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Library) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Library) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Library) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Library) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Library) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Library) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12288,52 +8134,18 @@ func (a LibraryFullStatus) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LibraryFullStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o LibraryFullStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LibraryFullStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LibraryFullStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LibraryFullStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LibraryFullStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LibraryFullStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LibraryFullStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_library_for_all_clusters": o.IsLibraryForAllClusters, + "library": o.Library, + "messages": o.Messages, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -12376,52 +8188,15 @@ func (a ListAllClusterLibraryStatusesResponse) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAllClusterLibraryStatusesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAllClusterLibraryStatusesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAllClusterLibraryStatusesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "statuses": o.Statuses, + }) } // Type implements basetypes.ObjectValuable. @@ -12462,52 +8237,16 @@ func (a ListAvailableZonesResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAvailableZonesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAvailableZonesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAvailableZonesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default_zone": o.DefaultZone, + "zones": o.Zones, + }) } // Type implements basetypes.ObjectValuable. @@ -12552,52 +8291,17 @@ func (a ListClusterCompliancesRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClusterCompliancesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClusterCompliancesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClusterCompliancesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -12642,52 +8346,17 @@ func (a ListClusterCompliancesResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClusterCompliancesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClusterCompliancesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClusterCompliancesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusters": o.Clusters, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -12731,52 +8400,16 @@ func (a ListClusterPoliciesRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClusterPoliciesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClusterPoliciesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClusterPoliciesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "sort_column": o.SortColumn, + "sort_order": o.SortOrder, + }) } // Type implements basetypes.ObjectValuable. @@ -12820,52 +8453,18 @@ func (a ListClustersFilterBy) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClustersFilterBy{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClustersFilterBy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClustersFilterBy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_sources": o.ClusterSources, + "cluster_states": o.ClusterStates, + "is_pinned": o.IsPinned, + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -12919,52 +8518,18 @@ func (a ListClustersRequest) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClustersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClustersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClustersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClustersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClustersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClustersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClustersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClustersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter_by": o.FilterBy, + "page_size": o.PageSize, + "page_token": o.PageToken, + "sort_by": o.SortBy, + }) } // Type implements basetypes.ObjectValuable. @@ -13014,52 +8579,17 @@ func (a ListClustersResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClustersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClustersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClustersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClustersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClustersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClustersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClustersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClustersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clusters": o.Clusters, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -13101,52 +8631,16 @@ func (a ListClustersSortBy) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListClustersSortBy{} - -// Equal implements basetypes.ObjectValuable. -func (o ListClustersSortBy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListClustersSortBy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListClustersSortBy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListClustersSortBy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListClustersSortBy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListClustersSortBy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListClustersSortBy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "direction": o.Direction, + "field": o.Field, + }) } // Type implements basetypes.ObjectValuable. @@ -13182,52 +8676,15 @@ func (a ListGlobalInitScriptsResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListGlobalInitScriptsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListGlobalInitScriptsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListGlobalInitScriptsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "scripts": o.Scripts, + }) } // Type implements basetypes.ObjectValuable. @@ -13264,52 +8721,15 @@ func (a ListInstancePools) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListInstancePools{} - -// Equal implements basetypes.ObjectValuable. -func (o ListInstancePools) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListInstancePools) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListInstancePools) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListInstancePools) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListInstancePools) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListInstancePools) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListInstancePools) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_pools": o.InstancePools, + }) } // Type implements basetypes.ObjectValuable. @@ -13347,52 +8767,15 @@ func (a ListInstanceProfilesResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListInstanceProfilesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListInstanceProfilesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListInstanceProfilesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_profiles": o.InstanceProfiles, + }) } // Type implements basetypes.ObjectValuable. @@ -13430,52 +8813,15 @@ func (a ListNodeTypesResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNodeTypesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNodeTypesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNodeTypesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "node_types": o.NodeTypes, + }) } // Type implements basetypes.ObjectValuable. @@ -13513,52 +8859,15 @@ func (a ListPoliciesResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPoliciesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPoliciesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPoliciesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "policies": o.Policies, + }) } // Type implements basetypes.ObjectValuable. @@ -13597,52 +8906,16 @@ func (a ListPolicyFamiliesRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPolicyFamiliesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPolicyFamiliesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -13682,52 +8955,16 @@ func (a ListPolicyFamiliesResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPolicyFamiliesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPolicyFamiliesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPolicyFamiliesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "policy_families": o.PolicyFamilies, + }) } // Type implements basetypes.ObjectValuable. @@ -13764,52 +9001,15 @@ func (a LocalFileInfo) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LocalFileInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o LocalFileInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LocalFileInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LocalFileInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LocalFileInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LocalFileInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LocalFileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LocalFileInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination": o.Destination, + }) } // Type implements basetypes.ObjectValuable. @@ -13840,57 +9040,21 @@ func (newState *LogAnalyticsInfo) SyncEffectiveFieldsDuringRead(existingState Lo // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogAnalyticsInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) String() string { - return fmt.Sprintf("%#v", o) +// SDK values. +func (a LogAnalyticsInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogAnalyticsInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogAnalyticsInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "log_analytics_primary_key": o.LogAnalyticsPrimaryKey, + "log_analytics_workspace_id": o.LogAnalyticsWorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -13929,52 +9093,16 @@ func (a LogSyncStatus) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogSyncStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o LogSyncStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogSyncStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogSyncStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogSyncStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogSyncStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogSyncStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogSyncStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "last_attempted": o.LastAttempted, + "last_exception": o.LastException, + }) } // Type implements basetypes.ObjectValuable. @@ -14020,52 +9148,17 @@ func (a MavenLibrary) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MavenLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o MavenLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MavenLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MavenLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MavenLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MavenLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MavenLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MavenLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "coordinates": o.Coordinates, + "exclusions": o.Exclusions, + "repo": o.Repo, + }) } // Type implements basetypes.ObjectValuable. @@ -14110,52 +9203,19 @@ func (a NodeInstanceType) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NodeInstanceType{} - -// Equal implements basetypes.ObjectValuable. -func (o NodeInstanceType) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NodeInstanceType) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NodeInstanceType) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NodeInstanceType) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NodeInstanceType) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NodeInstanceType) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NodeInstanceType) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -14241,52 +9301,35 @@ func (a NodeType) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NodeType{} - -// Equal implements basetypes.ObjectValuable. -func (o NodeType) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NodeType) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NodeType) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NodeType) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NodeType) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NodeType) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NodeType) 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. @@ -14345,52 +9388,16 @@ func (a PendingInstanceError) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PendingInstanceError{} - -// Equal implements basetypes.ObjectValuable. -func (o PendingInstanceError) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PendingInstanceError) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PendingInstanceError) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PendingInstanceError) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PendingInstanceError) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PendingInstanceError) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PendingInstanceError) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_id": o.InstanceId, + "message": o.Message, + }) } // Type implements basetypes.ObjectValuable. @@ -14425,52 +9432,15 @@ func (a PermanentDeleteCluster) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermanentDeleteCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermanentDeleteCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermanentDeleteCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -14502,52 +9472,13 @@ func (a PermanentDeleteClusterResponse) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermanentDeleteClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermanentDeleteClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermanentDeleteClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -14579,52 +9510,15 @@ func (a PinCluster) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PinCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o PinCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PinCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PinCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PinCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PinCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PinCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PinCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -14656,52 +9550,13 @@ func (a PinClusterResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PinClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PinClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PinClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PinClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PinClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PinClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PinClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PinClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -14779,52 +9634,25 @@ func (a Policy) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Policy{} - -// Equal implements basetypes.ObjectValuable. -func (o Policy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Policy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Policy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Policy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Policy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Policy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Policy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -14879,52 +9707,18 @@ func (a PolicyFamily) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PolicyFamily{} - -// Equal implements basetypes.ObjectValuable. -func (o PolicyFamily) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PolicyFamily) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PolicyFamily) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PolicyFamily) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PolicyFamily) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PolicyFamily) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PolicyFamily) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "definition": o.Definition, + "description": o.Description, + "name": o.Name, + "policy_family_id": o.PolicyFamilyId, + }) } // Type implements basetypes.ObjectValuable. @@ -14966,52 +9760,16 @@ func (a PythonPyPiLibrary) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PythonPyPiLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PythonPyPiLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PythonPyPiLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "package": o.Package, + "repo": o.Repo, + }) } // Type implements basetypes.ObjectValuable. @@ -15049,52 +9807,16 @@ func (a RCranLibrary) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RCranLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o RCranLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RCranLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RCranLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RCranLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RCranLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RCranLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RCranLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "package": o.Package, + "repo": o.Repo, + }) } // Type implements basetypes.ObjectValuable. @@ -15129,52 +9851,15 @@ func (a RemoveInstanceProfile) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RemoveInstanceProfile{} - -// Equal implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RemoveInstanceProfile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RemoveInstanceProfile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance_profile_arn": o.InstanceProfileArn, + }) } // Type implements basetypes.ObjectValuable. @@ -15206,52 +9891,13 @@ func (a RemoveResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RemoveResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RemoveResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RemoveResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RemoveResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RemoveResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RemoveResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RemoveResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RemoveResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -15300,52 +9946,17 @@ func (a ResizeCluster) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResizeCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o ResizeCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResizeCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResizeCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResizeCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResizeCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResizeCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResizeCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "autoscale": o.Autoscale, + "cluster_id": o.ClusterId, + "num_workers": o.NumWorkers, + }) } // Type implements basetypes.ObjectValuable. @@ -15381,52 +9992,13 @@ func (a ResizeClusterResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResizeClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResizeClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResizeClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -15460,52 +10032,16 @@ func (a RestartCluster) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestartCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o RestartCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestartCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestartCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestartCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestartCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestartCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestartCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "restart_user": o.RestartUser, + }) } // Type implements basetypes.ObjectValuable. @@ -15531,59 +10067,20 @@ func (newState *RestartClusterResponse) SyncEffectiveFieldsDuringRead(existingSt // Container types (types.Map, types.List, types.Set) and object types (types.Object) do not carry // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map -// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestartClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RestartClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestartClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestartClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestartClusterResponse) String() string { - return fmt.Sprintf("%#v", o) +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestartClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestartClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestartClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -15597,7 +10094,7 @@ type Results struct { // The cause of the error Cause types.String `tfsdk:"cause" tf:"optional"` - Data any `tfsdk:"data" tf:"optional"` + Data types.Object `tfsdk:"data" tf:"optional"` // The image filename FileName types.String `tfsdk:"fileName" tf:"optional"` @@ -15633,56 +10130,28 @@ func (newState *Results) SyncEffectiveFieldsDuringRead(existingState Results) { func (a Results) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ "fileNames": reflect.TypeOf(types.String{}), - "schema": reflect.TypeOf(struct{}{}), + "schema": reflect.TypeOf(types.Object{}), } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Results{} - -// Equal implements basetypes.ObjectValuable. -func (o Results) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Results) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Results) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Results) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Results) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Results) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Results) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15759,52 +10228,21 @@ func (a S3StorageInfo) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = S3StorageInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o S3StorageInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o S3StorageInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o S3StorageInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o S3StorageInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o S3StorageInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o S3StorageInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o S3StorageInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15869,52 +10307,21 @@ func (a SparkNode) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkNode{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkNode) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkNode) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkNode) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkNode) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkNode) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkNode) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkNode) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -15956,52 +10363,15 @@ func (a SparkNodeAwsAttributes) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkNodeAwsAttributes{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkNodeAwsAttributes) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkNodeAwsAttributes) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_spot": o.IsSpot, + }) } // Type implements basetypes.ObjectValuable. @@ -16041,52 +10411,16 @@ func (a SparkVersion) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkVersion{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkVersion) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkVersion) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkVersion) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkVersion) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkVersion) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkVersion) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkVersion) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -16121,52 +10455,15 @@ func (a StartCluster) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o StartCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -16198,52 +10495,13 @@ func (a StartClusterResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StartClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -16282,52 +10540,17 @@ func (a TerminationReason) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TerminationReason{} - -// Equal implements basetypes.ObjectValuable. -func (o TerminationReason) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TerminationReason) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TerminationReason) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TerminationReason) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TerminationReason) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TerminationReason) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TerminationReason) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "code": o.Code, + "parameters": o.Parameters, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -16369,52 +10592,16 @@ func (a UninstallLibraries) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UninstallLibraries{} - -// Equal implements basetypes.ObjectValuable. -func (o UninstallLibraries) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UninstallLibraries) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UninstallLibraries) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UninstallLibraries) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UninstallLibraries) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UninstallLibraries) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UninstallLibraries) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "libraries": o.Libraries, + }) } // Type implements basetypes.ObjectValuable. @@ -16449,52 +10636,13 @@ func (a UninstallLibrariesResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UninstallLibrariesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UninstallLibrariesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UninstallLibrariesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -16526,52 +10674,15 @@ func (a UnpinCluster) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnpinCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o UnpinCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnpinCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnpinCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnpinCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnpinCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnpinCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnpinCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + }) } // Type implements basetypes.ObjectValuable. @@ -16603,52 +10714,13 @@ func (a UnpinClusterResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnpinClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnpinClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnpinClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -16690,52 +10762,17 @@ func (a UpdateCluster) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster": o.Cluster, + "cluster_id": o.ClusterId, + "update_mask": o.UpdateMask, + }) } // Type implements basetypes.ObjectValuable. @@ -16929,52 +10966,40 @@ func (a UpdateClusterResource) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateClusterResource{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateClusterResource) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateClusterResource) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateClusterResource) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateClusterResource) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateClusterResource) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateClusterResource) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateClusterResource) 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. @@ -17055,52 +11080,13 @@ func (a UpdateClusterResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateClusterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateClusterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateClusterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -17130,52 +11116,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -17207,52 +11154,15 @@ func (a VolumesStorageInfo) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = VolumesStorageInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o VolumesStorageInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o VolumesStorageInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination": o.Destination, + }) } // Type implements basetypes.ObjectValuable. @@ -17288,52 +11198,15 @@ func (a WorkloadType) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkloadType{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkloadType) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkloadType) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkloadType) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkloadType) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkloadType) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkloadType) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkloadType) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "clients": o.Clients, + }) } // Type implements basetypes.ObjectValuable. @@ -17370,52 +11243,15 @@ func (a WorkspaceStorageInfo) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceStorageInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceStorageInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceStorageInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination": o.Destination, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/dashboards_tf/model.go b/internal/service/dashboards_tf/model.go index 2d080bc11..c5be2f3c5 100755 --- a/internal/service/dashboards_tf/model.go +++ b/internal/service/dashboards_tf/model.go @@ -12,17 +12,13 @@ package dashboards_tf import ( "context" - "fmt" "reflect" "github.com/databricks/databricks-sdk-go/service/sql" - 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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) // Create dashboard @@ -49,52 +45,15 @@ func (a CreateDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard": o.Dashboard, + }) } // Type implements basetypes.ObjectValuable. @@ -135,52 +94,16 @@ func (a CreateScheduleRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateScheduleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateScheduleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateScheduleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule": o.Schedule, + }) } // Type implements basetypes.ObjectValuable. @@ -224,52 +147,17 @@ func (a CreateSubscriptionRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateSubscriptionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateSubscriptionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateSubscriptionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + "subscription": o.Subscription, + }) } // Type implements basetypes.ObjectValuable. @@ -315,52 +203,16 @@ func (a CronSchedule) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CronSchedule{} - -// Equal implements basetypes.ObjectValuable. -func (o CronSchedule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CronSchedule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CronSchedule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CronSchedule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CronSchedule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CronSchedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CronSchedule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -426,52 +278,24 @@ func (a Dashboard) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Dashboard{} - -// Equal implements basetypes.ObjectValuable. -func (o Dashboard) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Dashboard) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Dashboard) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Dashboard) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Dashboard) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Dashboard) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Dashboard) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -520,52 +344,17 @@ func (a DeleteScheduleRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteScheduleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteScheduleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteScheduleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "etag": o.Etag, + "schedule_id": o.ScheduleId, + }) } // Type implements basetypes.ObjectValuable. @@ -599,52 +388,13 @@ func (a DeleteScheduleResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteScheduleResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteScheduleResponse +// only implements ToObjectValue() and Type(). +func (o DeleteScheduleResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteScheduleResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -684,52 +434,18 @@ func (a DeleteSubscriptionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteSubscriptionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteSubscriptionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteSubscriptionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "etag": o.Etag, + "schedule_id": o.ScheduleId, + "subscription_id": o.SubscriptionId, + }) } // Type implements basetypes.ObjectValuable. @@ -764,52 +480,13 @@ func (a DeleteSubscriptionResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteSubscriptionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteSubscriptionResponse +// only implements ToObjectValue() and Type(). +func (o DeleteSubscriptionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteSubscriptionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -846,52 +523,16 @@ func (a GenieAttachment) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieAttachment{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieAttachment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieAttachment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieAttachment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieAttachment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieAttachment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieAttachment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieAttachment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query": o.Query, + "text": o.Text, + }) } // Type implements basetypes.ObjectValuable. @@ -940,52 +581,20 @@ func (a GenieConversation) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieConversation{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieConversation) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieConversation) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieConversation) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieConversation) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieConversation) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieConversation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieConversation) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1028,52 +637,17 @@ func (a GenieCreateConversationMessageRequest) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieCreateConversationMessageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieCreateConversationMessageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieCreateConversationMessageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "conversation_id": o.ConversationId, + "space_id": o.SpaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1114,52 +688,17 @@ func (a GenieExecuteMessageQueryRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieExecuteMessageQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieExecuteMessageQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieExecuteMessageQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "conversation_id": o.ConversationId, + "message_id": o.MessageId, + "space_id": o.SpaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1202,52 +741,17 @@ func (a GenieGetConversationMessageRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieGetConversationMessageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieGetConversationMessageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieGetConversationMessageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "conversation_id": o.ConversationId, + "message_id": o.MessageId, + "space_id": o.SpaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1288,52 +792,17 @@ func (a GenieGetMessageQueryResultRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieGetMessageQueryResultRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieGetMessageQueryResultRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "conversation_id": o.ConversationId, + "message_id": o.MessageId, + "space_id": o.SpaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1350,7 +819,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 sql.StatementResponse `tfsdk:"statement_response" tf:"optional,object"` + StatementResponse types.List `tfsdk:"statement_response" tf:"optional,object"` } func (newState *GenieGetMessageQueryResultResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan GenieGetMessageQueryResultResponse) { @@ -1372,52 +841,15 @@ func (a GenieGetMessageQueryResultResponse) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieGetMessageQueryResultResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieGetMessageQueryResultResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieGetMessageQueryResultResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "statement_response": o.StatementResponse, + }) } // Type implements basetypes.ObjectValuable. @@ -1492,52 +924,25 @@ func (a GenieMessage) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1590,52 +995,16 @@ func (a GenieStartConversationMessageRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieStartConversationMessageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieStartConversationMessageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieStartConversationMessageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "space_id": o.SpaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1678,52 +1047,18 @@ func (a GenieStartConversationResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenieStartConversationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenieStartConversationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenieStartConversationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "conversation": o.Conversation, + "conversation_id": o.ConversationId, + "message": o.Message, + "message_id": o.MessageId, + }) } // Type implements basetypes.ObjectValuable. @@ -1765,60 +1100,23 @@ func (a GetDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDashboardRequest{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o GetDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o GetDashboardRequest) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "dashboard_id": types.StringType, - }, +// Type implements basetypes.ObjectValuable. +func (o GetDashboardRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "dashboard_id": types.StringType, + }, } } @@ -1845,52 +1143,15 @@ func (a GetPublishedDashboardRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPublishedDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPublishedDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPublishedDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -1927,52 +1188,16 @@ func (a GetScheduleRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetScheduleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetScheduleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetScheduleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetScheduleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetScheduleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetScheduleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetScheduleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetScheduleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + }) } // Type implements basetypes.ObjectValuable. @@ -2012,52 +1237,17 @@ func (a GetSubscriptionRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetSubscriptionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetSubscriptionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetSubscriptionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule_id": o.ScheduleId, + "subscription_id": o.SubscriptionId, + }) } // Type implements basetypes.ObjectValuable. @@ -2102,52 +1292,18 @@ func (a ListDashboardsRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDashboardsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + "show_trashed": o.ShowTrashed, + "view": o.View, + }) } // Type implements basetypes.ObjectValuable. @@ -2188,52 +1344,16 @@ func (a ListDashboardsResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDashboardsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDashboardsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboards": o.Dashboards, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2276,52 +1396,17 @@ func (a ListSchedulesRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSchedulesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSchedulesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSchedulesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2363,52 +1448,16 @@ func (a ListSchedulesResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSchedulesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSchedulesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSchedulesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "schedules": o.Schedules, + }) } // Type implements basetypes.ObjectValuable. @@ -2453,52 +1502,18 @@ func (a ListSubscriptionsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSubscriptionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSubscriptionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSubscriptionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "page_size": o.PageSize, + "page_token": o.PageToken, + "schedule_id": o.ScheduleId, + }) } // Type implements basetypes.ObjectValuable. @@ -2541,52 +1556,16 @@ func (a ListSubscriptionsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSubscriptionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSubscriptionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSubscriptionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "subscriptions": o.Subscriptions, + }) } // Type implements basetypes.ObjectValuable. @@ -2624,52 +1603,16 @@ func (a MessageError) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MessageError{} - -// Equal implements basetypes.ObjectValuable. -func (o MessageError) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MessageError) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MessageError) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MessageError) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MessageError) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MessageError) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MessageError) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error": o.Error, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -2709,52 +1652,17 @@ func (a MigrateDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MigrateDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MigrateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MigrateDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "display_name": o.DisplayName, + "parent_path": o.ParentPath, + "source_dashboard_id": o.SourceDashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -2797,52 +1705,17 @@ func (a PublishRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PublishRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PublishRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PublishRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PublishRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PublishRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PublishRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PublishRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PublishRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "embed_credentials": o.EmbedCredentials, + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -2884,52 +1757,18 @@ func (a PublishedDashboard) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PublishedDashboard{} - -// Equal implements basetypes.ObjectValuable. -func (o PublishedDashboard) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PublishedDashboard) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PublishedDashboard) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PublishedDashboard) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PublishedDashboard) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PublishedDashboard) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PublishedDashboard) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2980,52 +1819,21 @@ func (a QueryAttachment) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryAttachment{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryAttachment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryAttachment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryAttachment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryAttachment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryAttachment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryAttachment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryAttachment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "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. @@ -3071,52 +1879,17 @@ func (a Result) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Result{} - -// Equal implements basetypes.ObjectValuable. -func (o Result) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Result) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Result) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Result) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Result) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Result) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Result) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_truncated": o.IsTruncated, + "row_count": o.RowCount, + "statement_id": o.StatementId, + }) } // Type implements basetypes.ObjectValuable. @@ -3173,52 +1946,23 @@ func (a Schedule) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Schedule{} - -// Equal implements basetypes.ObjectValuable. -func (o Schedule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Schedule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Schedule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Schedule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Schedule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Schedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Schedule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3269,52 +2013,16 @@ func (a Subscriber) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Subscriber{} - -// Equal implements basetypes.ObjectValuable. -func (o Subscriber) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Subscriber) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Subscriber) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Subscriber) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Subscriber) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Subscriber) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Subscriber) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination_subscriber": o.DestinationSubscriber, + "user_subscriber": o.UserSubscriber, + }) } // Type implements basetypes.ObjectValuable. @@ -3373,52 +2081,22 @@ func (a Subscription) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Subscription{} - -// Equal implements basetypes.ObjectValuable. -func (o Subscription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Subscription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Subscription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Subscription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Subscription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Subscription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Subscription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3462,52 +2140,15 @@ func (a SubscriptionSubscriberDestination) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SubscriptionSubscriberDestination{} - -// Equal implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SubscriptionSubscriberDestination) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberDestination) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination_id": o.DestinationId, + }) } // Type implements basetypes.ObjectValuable. @@ -3541,52 +2182,15 @@ func (a SubscriptionSubscriberUser) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SubscriptionSubscriberUser{} - -// Equal implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SubscriptionSubscriberUser) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SubscriptionSubscriberUser) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "user_id": o.UserId, + }) } // Type implements basetypes.ObjectValuable. @@ -3622,52 +2226,16 @@ func (a TextAttachment) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TextAttachment{} - -// Equal implements basetypes.ObjectValuable. -func (o TextAttachment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TextAttachment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TextAttachment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TextAttachment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TextAttachment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TextAttachment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TextAttachment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3703,52 +2271,15 @@ func (a TrashDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TrashDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TrashDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TrashDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -3780,52 +2311,13 @@ func (a TrashDashboardResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TrashDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TrashDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TrashDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3858,52 +2350,15 @@ func (a UnpublishDashboardRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnpublishDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnpublishDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnpublishDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -3935,52 +2390,13 @@ func (a UnpublishDashboardResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UnpublishDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UnpublishDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UnpublishDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4016,52 +2432,16 @@ func (a UpdateDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard": o.Dashboard, + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -4105,52 +2485,17 @@ func (a UpdateScheduleRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateScheduleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateScheduleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateScheduleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "schedule": o.Schedule, + "schedule_id": o.ScheduleId, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/files_tf/model.go b/internal/service/files_tf/model.go index 35c9e7546..37fe8b385 100755 --- a/internal/service/files_tf/model.go +++ b/internal/service/files_tf/model.go @@ -12,16 +12,11 @@ package files_tf import ( "context" - "fmt" - "io" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AddBlock struct { @@ -49,52 +44,16 @@ func (a AddBlock) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddBlock{} - -// Equal implements basetypes.ObjectValuable. -func (o AddBlock) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddBlock) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddBlock) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddBlock) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddBlock) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddBlock) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddBlock) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data": o.Data, + "handle": o.Handle, + }) } // Type implements basetypes.ObjectValuable. @@ -127,52 +86,13 @@ func (a AddBlockResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddBlockResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AddBlockResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddBlockResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddBlockResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddBlockResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddBlockResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddBlockResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddBlockResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -204,52 +124,15 @@ func (a Close) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Close{} - -// Equal implements basetypes.ObjectValuable. -func (o Close) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Close) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Close) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Close) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Close) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Close) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Close) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "handle": o.Handle, + }) } // Type implements basetypes.ObjectValuable. @@ -281,52 +164,13 @@ func (a CloseResponse) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CloseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CloseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CloseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CloseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CloseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CloseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CloseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CloseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -360,52 +204,16 @@ func (a Create) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Create{} - -// Equal implements basetypes.ObjectValuable. -func (o Create) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Create) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Create) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Create) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Create) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Create) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Create) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "overwrite": o.Overwrite, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -441,52 +249,15 @@ func (a CreateDirectoryRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateDirectoryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateDirectoryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateDirectoryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) } // Type implements basetypes.ObjectValuable. @@ -518,52 +289,13 @@ func (a CreateDirectoryResponse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateDirectoryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateDirectoryResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateDirectoryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -596,52 +328,15 @@ func (a CreateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "handle": o.Handle, + }) } // Type implements basetypes.ObjectValuable. @@ -679,52 +374,16 @@ func (a Delete) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Delete{} - -// Equal implements basetypes.ObjectValuable. -func (o Delete) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Delete) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Delete) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Delete) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Delete) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Delete) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Delete) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + "recursive": o.Recursive, + }) } // Type implements basetypes.ObjectValuable. @@ -760,52 +419,15 @@ func (a DeleteDirectoryRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDirectoryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDirectoryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDirectoryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) } // Type implements basetypes.ObjectValuable. @@ -837,52 +459,13 @@ func (a DeleteDirectoryResponse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDirectoryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDirectoryResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDirectoryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -915,52 +498,15 @@ func (a DeleteFileRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteFileRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteFileRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteFileRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteFileRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteFileRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteFileRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteFileRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteFileRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_path": o.FilePath, + }) } // Type implements basetypes.ObjectValuable. @@ -992,52 +538,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1078,52 +585,19 @@ func (a DirectoryEntry) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DirectoryEntry{} - -// Equal implements basetypes.ObjectValuable. -func (o DirectoryEntry) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DirectoryEntry) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DirectoryEntry) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DirectoryEntry) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DirectoryEntry) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DirectoryEntry) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DirectoryEntry) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1162,52 +636,15 @@ func (a DownloadRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DownloadRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DownloadRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DownloadRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DownloadRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DownloadRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DownloadRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DownloadRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DownloadRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_path": o.FilePath, + }) } // Type implements basetypes.ObjectValuable. @@ -1224,7 +661,7 @@ type DownloadResponse struct { ContentType types.String `tfsdk:"-"` - Contents io.ReadCloser `tfsdk:"-"` + Contents types.Object `tfsdk:"-"` LastModified types.String `tfsdk:"-"` } @@ -1246,52 +683,18 @@ func (a DownloadResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DownloadResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DownloadResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DownloadResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DownloadResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DownloadResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DownloadResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DownloadResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DownloadResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content-length": o.ContentLength, + "content-type": o.ContentType, + "contents": o.Contents, + "last-modified": o.LastModified, + }) } // Type implements basetypes.ObjectValuable. @@ -1334,52 +737,18 @@ func (a FileInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o FileInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, FileInfo +// only implements ToObjectValue() and Type(). +func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_size": o.FileSize, + "is_dir": o.IsDir, + "modification_time": o.ModificationTime, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -1417,52 +786,15 @@ func (a GetDirectoryMetadataRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDirectoryMetadataRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDirectoryMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + }) } // Type implements basetypes.ObjectValuable. @@ -1494,52 +826,13 @@ func (a GetDirectoryMetadataResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDirectoryMetadataResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDirectoryMetadataResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDirectoryMetadataResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1572,52 +865,15 @@ func (a GetMetadataRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetMetadataRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetMetadataRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetMetadataRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetMetadataRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetMetadataRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetMetadataRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetMetadataRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_path": o.FilePath, + }) } // Type implements basetypes.ObjectValuable. @@ -1654,52 +910,17 @@ func (a GetMetadataResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetMetadataResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetMetadataResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetMetadataResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetMetadataResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetMetadataResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetMetadataResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetMetadataResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetMetadataResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content-length": o.ContentLength, + "content-type": o.ContentType, + "last-modified": o.LastModified, + }) } // Type implements basetypes.ObjectValuable. @@ -1737,52 +958,15 @@ func (a GetStatusRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -1818,52 +1002,15 @@ func (a ListDbfsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDbfsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListDbfsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDbfsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDbfsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDbfsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDbfsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDbfsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDbfsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -1918,52 +1065,17 @@ func (a ListDirectoryContentsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDirectoryContentsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDirectoryContentsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDirectoryContentsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "directory_path": o.DirectoryPath, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2003,52 +1115,16 @@ func (a ListDirectoryResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDirectoryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDirectoryResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDirectoryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "contents": o.Contents, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2088,52 +1164,15 @@ func (a ListStatusResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListStatusResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListStatusResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListStatusResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListStatusResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListStatusResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListStatusResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListStatusResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListStatusResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "files": o.Files, + }) } // Type implements basetypes.ObjectValuable. @@ -2169,52 +1208,15 @@ func (a MkDirs) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MkDirs{} - -// Equal implements basetypes.ObjectValuable. -func (o MkDirs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MkDirs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MkDirs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MkDirs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MkDirs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MkDirs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MkDirs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -2246,52 +1248,13 @@ func (a MkDirsResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MkDirsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o MkDirsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MkDirsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MkDirsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MkDirsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MkDirsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MkDirsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MkDirsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2327,52 +1290,16 @@ func (a Move) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Move{} - -// Equal implements basetypes.ObjectValuable. -func (o Move) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Move) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Move) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Move) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Move) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Move) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Move) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination_path": o.DestinationPath, + "source_path": o.SourcePath, + }) } // Type implements basetypes.ObjectValuable. @@ -2405,52 +1332,13 @@ func (a MoveResponse) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MoveResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o MoveResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MoveResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MoveResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MoveResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MoveResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MoveResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MoveResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2486,52 +1374,17 @@ func (a Put) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Put{} - -// Equal implements basetypes.ObjectValuable. -func (o Put) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Put) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Put) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Put) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Put) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Put) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Put) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "contents": o.Contents, + "overwrite": o.Overwrite, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -2565,52 +1418,13 @@ func (a PutResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PutResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2648,52 +1462,17 @@ func (a ReadDbfsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReadDbfsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReadDbfsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReadDbfsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "length": o.Length, + "offset": o.Offset, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -2733,52 +1512,16 @@ func (a ReadResponse) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReadResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ReadResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReadResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReadResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReadResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReadResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReadResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReadResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bytes_read": o.BytesRead, + "data": o.Data, + }) } // Type implements basetypes.ObjectValuable. @@ -2793,7 +1536,7 @@ func (o ReadResponse) Type(ctx context.Context) attr.Type { // Upload a file type UploadRequest struct { - Contents io.ReadCloser `tfsdk:"-"` + Contents types.Object `tfsdk:"-"` // The absolute path of the file. FilePath types.String `tfsdk:"-"` // If true, an existing file will be overwritten. @@ -2817,52 +1560,17 @@ func (a UploadRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UploadRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UploadRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UploadRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UploadRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UploadRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UploadRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UploadRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UploadRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "contents": o.Contents, + "file_path": o.FilePath, + "overwrite": o.Overwrite, + }) } // Type implements basetypes.ObjectValuable. @@ -2896,52 +1604,13 @@ func (a UploadResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UploadResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UploadResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UploadResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UploadResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UploadResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UploadResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UploadResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UploadResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/iam_tf/model.go b/internal/service/iam_tf/model.go index cfc82023c..6c9095fa2 100755 --- a/internal/service/iam_tf/model.go +++ b/internal/service/iam_tf/model.go @@ -12,15 +12,11 @@ package iam_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AccessControlRequest struct { @@ -51,52 +47,18 @@ func (a AccessControlRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -143,52 +105,19 @@ func (a AccessControlResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -235,52 +164,19 @@ func (a ComplexValue) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ComplexValue{} - -// Equal implements basetypes.ObjectValuable. -func (o ComplexValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ComplexValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ComplexValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ComplexValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ComplexValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ComplexValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ComplexValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "display": o.Display, + "primary": o.Primary, + "$ref": o.Ref, + "type": o.Type_, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -319,52 +215,15 @@ func (a DeleteAccountGroupRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountGroupRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountGroupRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountGroupRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -399,52 +258,15 @@ func (a DeleteAccountServicePrincipalRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountServicePrincipalRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountServicePrincipalRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountServicePrincipalRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -479,52 +301,15 @@ func (a DeleteAccountUserRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountUserRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountUserRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountUserRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -559,52 +344,15 @@ func (a DeleteGroupRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteGroupRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteGroupRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteGroupRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -636,52 +384,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -714,52 +423,15 @@ func (a DeleteServicePrincipalRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteServicePrincipalRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteServicePrincipalRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -794,52 +466,15 @@ func (a DeleteUserRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteUserRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteUserRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteUserRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteUserRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteUserRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteUserRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteUserRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteUserRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -876,52 +511,16 @@ func (a DeleteWorkspaceAssignmentRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWorkspaceAssignmentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWorkspaceAssignmentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal_id": o.PrincipalId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -954,52 +553,13 @@ func (a DeleteWorkspacePermissionAssignmentResponse) GetComplexFieldTypes(ctx co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWorkspacePermissionAssignmentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspacePermissionAssignmentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWorkspacePermissionAssignmentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1032,52 +592,15 @@ func (a GetAccountGroupRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountGroupRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountGroupRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountGroupRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1112,52 +635,15 @@ func (a GetAccountServicePrincipalRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountServicePrincipalRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountServicePrincipalRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountServicePrincipalRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1213,52 +699,22 @@ func (a GetAccountUserRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountUserRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountUserRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountUserRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1300,52 +756,15 @@ func (a GetAssignableRolesForResourceRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAssignableRolesForResourceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAssignableRolesForResourceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "resource": o.Resource, + }) } // Type implements basetypes.ObjectValuable. @@ -1380,52 +799,15 @@ func (a GetAssignableRolesForResourceResponse) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAssignableRolesForResourceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAssignableRolesForResourceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAssignableRolesForResourceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "roles": o.Roles, + }) } // Type implements basetypes.ObjectValuable. @@ -1462,52 +844,15 @@ func (a GetGroupRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetGroupRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetGroupRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetGroupRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetGroupRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetGroupRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetGroupRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetGroupRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetGroupRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1543,52 +888,15 @@ func (a GetPasswordPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPasswordPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPasswordPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPasswordPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -1627,52 +935,16 @@ func (a GetPermissionLevelsRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -1709,52 +981,15 @@ func (a GetPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -1797,52 +1032,16 @@ func (a GetPermissionRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPermissionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPermissionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPermissionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPermissionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPermissionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPermissionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPermissionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPermissionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -1887,52 +1086,16 @@ func (a GetRuleSetRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRuleSetRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRuleSetRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRuleSetRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1968,52 +1131,15 @@ func (a GetServicePrincipalRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetServicePrincipalRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetServicePrincipalRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetServicePrincipalRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2069,52 +1195,22 @@ func (a GetUserRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetUserRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetUserRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetUserRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetUserRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetUserRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetUserRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetUserRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetUserRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2156,52 +1252,15 @@ func (a GetWorkspaceAssignmentRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceAssignmentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceAssignmentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -2239,52 +1298,16 @@ func (a GrantRule) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GrantRule{} - -// Equal implements basetypes.ObjectValuable. -func (o GrantRule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GrantRule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GrantRule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GrantRule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GrantRule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GrantRule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GrantRule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principals": o.Principals, + "role": o.Role, + }) } // Type implements basetypes.ObjectValuable. @@ -2347,52 +1370,23 @@ func (a Group) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Group{} - -// Equal implements basetypes.ObjectValuable. -func (o Group) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Group) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Group) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Group) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Group) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Group) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Group) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2461,56 +1455,25 @@ func (newState *ListAccountGroupsRequest) SyncEffectiveFieldsDuringRead(existing // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountGroupsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) String() string { - return fmt.Sprintf("%#v", o) +func (a ListAccountGroupsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountGroupsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountGroupsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2569,52 +1532,21 @@ func (a ListAccountServicePrincipalsRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountServicePrincipalsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountServicePrincipalsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountServicePrincipalsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2674,52 +1606,21 @@ func (a ListAccountUsersRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAccountUsersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAccountUsersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAccountUsersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2778,52 +1679,21 @@ func (a ListGroupsRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListGroupsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListGroupsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListGroupsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListGroupsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListGroupsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListGroupsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListGroupsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListGroupsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2875,52 +1745,19 @@ func (a ListGroupsResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListGroupsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListGroupsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListGroupsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListGroupsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListGroupsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListGroupsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListGroupsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListGroupsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) } // Type implements basetypes.ObjectValuable. @@ -2974,52 +1811,19 @@ func (a ListServicePrincipalResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListServicePrincipalResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) } // Type implements basetypes.ObjectValuable. @@ -3080,52 +1884,21 @@ func (a ListServicePrincipalsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListServicePrincipalsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3185,52 +1958,21 @@ func (a ListUsersRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListUsersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListUsersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListUsersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListUsersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListUsersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListUsersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListUsersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListUsersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3282,52 +2024,19 @@ func (a ListUsersResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListUsersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListUsersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListUsersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListUsersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListUsersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListUsersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListUsersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListUsersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "itemsPerPage": o.ItemsPerPage, + "Resources": o.Resources, + "schemas": o.Schemas, + "startIndex": o.StartIndex, + "totalResults": o.TotalResults, + }) } // Type implements basetypes.ObjectValuable. @@ -3370,52 +2079,15 @@ func (a ListWorkspaceAssignmentRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListWorkspaceAssignmentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListWorkspaceAssignmentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListWorkspaceAssignmentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -3456,52 +2128,18 @@ func (a MigratePermissionsRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MigratePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MigratePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MigratePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3538,52 +2176,15 @@ func (a MigratePermissionsResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MigratePermissionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MigratePermissionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MigratePermissionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permissions_migrated": o.PermissionsMigrated, + }) } // Type implements basetypes.ObjectValuable. @@ -3619,52 +2220,16 @@ func (a Name) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Name{} - -// Equal implements basetypes.ObjectValuable. -func (o Name) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Name) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Name) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Name) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Name) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Name) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Name) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "familyName": o.FamilyName, + "givenName": o.GivenName, + }) } // Type implements basetypes.ObjectValuable. @@ -3704,52 +2269,17 @@ func (a ObjectPermissions) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ObjectPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o ObjectPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ObjectPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ObjectPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ObjectPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ObjectPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ObjectPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ObjectPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -3795,52 +2325,17 @@ func (a PartialUpdate) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PartialUpdate{} - -// Equal implements basetypes.ObjectValuable. -func (o PartialUpdate) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PartialUpdate) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PartialUpdate) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PartialUpdate) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PartialUpdate) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PartialUpdate) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PartialUpdate) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "Operations": o.Operations, + "schemas": o.Schemas, + }) } // Type implements basetypes.ObjectValuable. @@ -3886,52 +2381,18 @@ func (a PasswordAccessControlRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3978,52 +2439,19 @@ func (a PasswordAccessControlResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4068,52 +2496,17 @@ func (a PasswordPermission) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4156,52 +2549,17 @@ func (a PasswordPermissions) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -4240,52 +2598,16 @@ func (a PasswordPermissionsDescription) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4321,52 +2643,15 @@ func (a PasswordPermissionsRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PasswordPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PasswordPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PasswordPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + }) } // Type implements basetypes.ObjectValuable. @@ -4386,7 +2671,7 @@ type Patch struct { // Selection of patch operation Path types.String `tfsdk:"path" tf:"optional"` // Value to modify - Value any `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:"optional"` } func (newState *Patch) SyncEffectiveFieldsDuringCreateOrUpdate(plan Patch) { @@ -4406,52 +2691,17 @@ func (a Patch) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Patch{} - -// Equal implements basetypes.ObjectValuable. -func (o Patch) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Patch) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Patch) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Patch) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Patch) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Patch) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Patch) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "op": o.Op, + "path": o.Path, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -4485,52 +2735,13 @@ func (a PatchResponse) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PatchResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PatchResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PatchResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PatchResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PatchResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PatchResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PatchResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PatchResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4567,52 +2778,17 @@ func (a Permission) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Permission{} - -// Equal implements basetypes.ObjectValuable. -func (o Permission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Permission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Permission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Permission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Permission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Permission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Permission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4659,52 +2835,17 @@ func (a PermissionAssignment) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error": o.Error, + "permissions": o.Permissions, + "principal": o.Principal, + }) } // Type implements basetypes.ObjectValuable. @@ -4746,52 +2887,15 @@ func (a PermissionAssignments) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionAssignments{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionAssignments) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionAssignments) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionAssignments) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionAssignments) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionAssignments) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionAssignments) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionAssignments) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_assignments": o.PermissionAssignments, + }) } // Type implements basetypes.ObjectValuable. @@ -4829,52 +2933,16 @@ func (a PermissionOutput) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4910,52 +2978,16 @@ func (a PermissionsDescription) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4999,52 +3031,17 @@ func (a PermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "request_object_id": o.RequestObjectId, + "request_object_type": o.RequestObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -5092,52 +3089,19 @@ func (a PrincipalOutput) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PrincipalOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o PrincipalOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PrincipalOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PrincipalOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PrincipalOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PrincipalOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PrincipalOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PrincipalOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5176,52 +3140,15 @@ func (a ResourceMeta) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResourceMeta{} - -// Equal implements basetypes.ObjectValuable. -func (o ResourceMeta) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResourceMeta) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResourceMeta) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResourceMeta) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResourceMeta) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResourceMeta) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResourceMeta) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "resourceType": o.ResourceType, + }) } // Type implements basetypes.ObjectValuable. @@ -5255,52 +3182,15 @@ func (a Role) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Role{} - -// Equal implements basetypes.ObjectValuable. -func (o Role) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Role) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Role) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Role) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Role) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Role) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Role) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5340,52 +3230,17 @@ func (a RuleSetResponse) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RuleSetResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RuleSetResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RuleSetResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RuleSetResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RuleSetResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RuleSetResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RuleSetResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RuleSetResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "grant_rules": o.GrantRules, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5431,52 +3286,17 @@ func (a RuleSetUpdateRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RuleSetUpdateRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RuleSetUpdateRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RuleSetUpdateRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "grant_rules": o.GrantRules, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5538,52 +3358,23 @@ func (a ServicePrincipal) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServicePrincipal{} - -// Equal implements basetypes.ObjectValuable. -func (o ServicePrincipal) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServicePrincipal) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServicePrincipal) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServicePrincipal) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServicePrincipal) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServicePrincipal) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServicePrincipal) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5631,52 +3422,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5712,52 +3464,16 @@ func (a UpdateRuleSetRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRuleSetRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRuleSetRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRuleSetRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "rule_set": o.RuleSet, + }) } // Type implements basetypes.ObjectValuable. @@ -5805,52 +3521,17 @@ func (a UpdateWorkspaceAssignments) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateWorkspaceAssignments{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceAssignments) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceAssignments) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permissions": o.Permissions, + "principal_id": o.PrincipalId, + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -5924,52 +3605,25 @@ func (a User) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = User{} - -// Equal implements basetypes.ObjectValuable. -func (o User) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o User) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o User) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o User) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o User) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o User) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o User) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6027,52 +3681,15 @@ func (a WorkspacePermissions) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspacePermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspacePermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspacePermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspacePermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspacePermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspacePermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspacePermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspacePermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permissions": o.Permissions, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/jobs_tf/model.go b/internal/service/jobs_tf/model.go index dca7a02c1..138c75510 100755 --- a/internal/service/jobs_tf/model.go +++ b/internal/service/jobs_tf/model.go @@ -12,17 +12,13 @@ package jobs_tf import ( "context" - "fmt" "reflect" "github.com/databricks/databricks-sdk-go/service/compute" - 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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type BaseJob struct { @@ -65,52 +61,19 @@ func (a BaseJob) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BaseJob{} - -// Equal implements basetypes.ObjectValuable. -func (o BaseJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BaseJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BaseJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BaseJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BaseJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BaseJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BaseJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -288,52 +251,45 @@ func (a BaseRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BaseRun{} - -// Equal implements basetypes.ObjectValuable. -func (o BaseRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BaseRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BaseRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BaseRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BaseRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BaseRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BaseRun) 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. @@ -424,52 +380,16 @@ func (a CancelAllRuns) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelAllRuns{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelAllRuns) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelAllRuns) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelAllRuns) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelAllRuns) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelAllRuns) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelAllRuns) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelAllRuns) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "all_queued_runs": o.AllQueuedRuns, + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -502,52 +422,13 @@ func (a CancelAllRunsResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelAllRunsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelAllRunsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelAllRunsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -579,52 +460,15 @@ func (a CancelRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelRun{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -656,52 +500,13 @@ func (a CancelRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -749,52 +554,16 @@ func (a ClusterInstance) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterInstance{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterInstance) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterInstance) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterInstance) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterInstance) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterInstance) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterInstance) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterInstance) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cluster_id": o.ClusterId, + "spark_context_id": o.SparkContextId, + }) } // Type implements basetypes.ObjectValuable. @@ -821,7 +590,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 compute.ClusterSpec `tfsdk:"new_cluster" tf:"optional,object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"optional,object"` } func (newState *ClusterSpec) SyncEffectiveFieldsDuringCreateOrUpdate(plan ClusterSpec) { @@ -844,52 +613,18 @@ func (a ClusterSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -945,52 +680,17 @@ func (a ConditionTask) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ConditionTask{} - -// Equal implements basetypes.ObjectValuable. -func (o ConditionTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ConditionTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ConditionTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ConditionTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ConditionTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ConditionTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ConditionTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "left": o.Left, + "op": o.Op, + "right": o.Right, + }) } // Type implements basetypes.ObjectValuable. @@ -1027,52 +727,15 @@ func (a Continuous) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Continuous{} - -// Equal implements basetypes.ObjectValuable. -func (o Continuous) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Continuous) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Continuous) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Continuous) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Continuous) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Continuous) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Continuous) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pause_status": o.PauseStatus, + }) } // Type implements basetypes.ObjectValuable. @@ -1225,52 +888,38 @@ func (a CreateJob) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateJob{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateJob) 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. @@ -1362,52 +1011,15 @@ func (a CreateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -1451,52 +1063,17 @@ func (a CronSchedule) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CronSchedule{} - -// Equal implements basetypes.ObjectValuable. -func (o CronSchedule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CronSchedule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CronSchedule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CronSchedule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CronSchedule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CronSchedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CronSchedule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pause_status": o.PauseStatus, + "quartz_cron_expression": o.QuartzCronExpression, + "timezone_id": o.TimezoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -1539,52 +1116,16 @@ func (a DbtOutput) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DbtOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o DbtOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DbtOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DbtOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DbtOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DbtOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DbtOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DbtOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifacts_headers": o.ArtifactsHeaders, + "artifacts_link": o.ArtifactsLink, + }) } // Type implements basetypes.ObjectValuable. @@ -1655,52 +1196,21 @@ func (a DbtTask) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DbtTask{} - -// Equal implements basetypes.ObjectValuable. -func (o DbtTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DbtTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DbtTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DbtTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DbtTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DbtTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DbtTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1742,52 +1252,15 @@ func (a DeleteJob) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteJob{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -1819,52 +1292,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1896,52 +1330,15 @@ func (a DeleteRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRun{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteRun +// only implements ToObjectValue() and Type(). +func (o DeleteRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -1973,52 +1370,13 @@ func (a DeleteRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2063,52 +1421,17 @@ func (a EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) GetComple return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnforcePolicyComplianceForJobResponseJobClusterSettingsChange{} - -// Equal implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceForJobResponseJobClusterSettingsChange) 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. @@ -2147,52 +1470,16 @@ func (a EnforcePolicyComplianceRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnforcePolicyComplianceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + "validate_only": o.ValidateOnly, + }) } // Type implements basetypes.ObjectValuable. @@ -2242,52 +1529,17 @@ func (a EnforcePolicyComplianceResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnforcePolicyComplianceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnforcePolicyComplianceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnforcePolicyComplianceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "has_changes": o.HasChanges, + "job_cluster_changes": o.JobClusterChanges, + "settings": o.Settings, + }) } // Type implements basetypes.ObjectValuable. @@ -2334,52 +1586,15 @@ func (a ExportRunOutput) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportRunOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportRunOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportRunOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportRunOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportRunOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportRunOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportRunOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportRunOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "views": o.Views, + }) } // Type implements basetypes.ObjectValuable. @@ -2418,52 +1633,16 @@ func (a ExportRunRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportRunRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportRunRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportRunRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportRunRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportRunRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportRunRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportRunRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportRunRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + "views_to_export": o.ViewsToExport, + }) } // Type implements basetypes.ObjectValuable. @@ -2508,52 +1687,17 @@ func (a FileArrivalTriggerConfiguration) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileArrivalTriggerConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FileArrivalTriggerConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileArrivalTriggerConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2594,52 +1738,16 @@ func (a ForEachStats) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ForEachStats{} - -// Equal implements basetypes.ObjectValuable. -func (o ForEachStats) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ForEachStats) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ForEachStats) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ForEachStats) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ForEachStats) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ForEachStats) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ForEachStats) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error_message_stats": o.ErrorMessageStats, + "task_run_stats": o.TaskRunStats, + }) } // Type implements basetypes.ObjectValuable. @@ -2687,52 +1795,17 @@ func (a ForEachTask) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ForEachTask{} - -// Equal implements basetypes.ObjectValuable. -func (o ForEachTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ForEachTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ForEachTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ForEachTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ForEachTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ForEachTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ForEachTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "concurrency": o.Concurrency, + "inputs": o.Inputs, + "task": o.Task, + }) } // Type implements basetypes.ObjectValuable. @@ -2775,52 +1848,17 @@ func (a ForEachTaskErrorMessageStats) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ForEachTaskErrorMessageStats{} - -// Equal implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ForEachTaskErrorMessageStats) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ForEachTaskErrorMessageStats) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "count": o.Count, + "error_message": o.ErrorMessage, + "termination_category": o.TerminationCategory, + }) } // Type implements basetypes.ObjectValuable. @@ -2867,52 +1905,20 @@ func (a ForEachTaskTaskRunStats) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ForEachTaskTaskRunStats{} - -// Equal implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ForEachTaskTaskRunStats) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ForEachTaskTaskRunStats) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2952,52 +1958,15 @@ func (a GetJobPermissionLevelsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetJobPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -3033,52 +2002,15 @@ func (a GetJobPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetJobPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetJobPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -3115,52 +2047,15 @@ func (a GetJobPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetJobPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetJobPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetJobPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -3196,52 +2091,15 @@ func (a GetJobRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetJobRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetJobRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetJobRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetJobRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetJobRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetJobRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetJobRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetJobRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -3276,52 +2134,15 @@ func (a GetPolicyComplianceRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPolicyComplianceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPolicyComplianceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPolicyComplianceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -3366,52 +2187,16 @@ func (a GetPolicyComplianceResponse) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPolicyComplianceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPolicyComplianceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPolicyComplianceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "violations": o.Violations, + }) } // Type implements basetypes.ObjectValuable. @@ -3449,52 +2234,15 @@ func (a GetRunOutputRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRunOutputRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRunOutputRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRunOutputRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -3537,52 +2285,18 @@ func (a GetRunRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRunRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRunRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRunRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRunRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRunRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRunRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRunRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRunRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3623,52 +2337,15 @@ func (a GitSnapshot) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GitSnapshot{} - -// Equal implements basetypes.ObjectValuable. -func (o GitSnapshot) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GitSnapshot) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GitSnapshot) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GitSnapshot) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GitSnapshot) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GitSnapshot) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GitSnapshot) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "used_commit": o.UsedCommit, + }) } // Type implements basetypes.ObjectValuable. @@ -3733,52 +2410,21 @@ func (a GitSource) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GitSource{} - -// Equal implements basetypes.ObjectValuable. -func (o GitSource) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GitSource) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GitSource) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GitSource) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GitSource) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GitSource) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GitSource) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3849,52 +2495,20 @@ func (a Job) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Job{} - -// Equal implements basetypes.ObjectValuable. -func (o Job) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Job) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Job) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Job) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Job) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Job) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Job) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3941,52 +2555,18 @@ func (a JobAccessControlRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4033,52 +2613,19 @@ func (a JobAccessControlResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4102,7 +2649,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 compute.ClusterSpec `tfsdk:"new_cluster" tf:"object"` + NewCluster types.List `tfsdk:"new_cluster" tf:"object"` } func (newState *JobCluster) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobCluster) { @@ -4124,52 +2671,16 @@ func (a JobCluster) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o JobCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_cluster_key": o.JobClusterKey, + "new_cluster": o.NewCluster, + }) } // Type implements basetypes.ObjectValuable. @@ -4216,52 +2727,17 @@ func (a JobCompliance) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobCompliance{} - -// Equal implements basetypes.ObjectValuable. -func (o JobCompliance) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobCompliance) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobCompliance) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobCompliance) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobCompliance) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobCompliance) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobCompliance) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_compliant": o.IsCompliant, + "job_id": o.JobId, + "violations": o.Violations, + }) } // Type implements basetypes.ObjectValuable. @@ -4303,52 +2779,16 @@ func (a JobDeployment) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobDeployment{} - -// Equal implements basetypes.ObjectValuable. -func (o JobDeployment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobDeployment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobDeployment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobDeployment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobDeployment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobDeployment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobDeployment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "kind": o.Kind, + "metadata_file_path": o.MetadataFilePath, + }) } // Type implements basetypes.ObjectValuable. @@ -4420,52 +2860,20 @@ func (a JobEmailNotifications) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobEmailNotifications{} - -// Equal implements basetypes.ObjectValuable. -func (o JobEmailNotifications) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobEmailNotifications) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobEmailNotifications) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobEmailNotifications) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobEmailNotifications) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobEmailNotifications) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobEmailNotifications) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4498,7 +2906,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 compute.Environment `tfsdk:"spec" tf:"optional,object"` + Spec types.List `tfsdk:"spec" tf:"optional,object"` } func (newState *JobEnvironment) SyncEffectiveFieldsDuringCreateOrUpdate(plan JobEnvironment) { @@ -4520,52 +2928,16 @@ func (a JobEnvironment) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobEnvironment{} - -// Equal implements basetypes.ObjectValuable. -func (o JobEnvironment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobEnvironment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobEnvironment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobEnvironment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobEnvironment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobEnvironment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobEnvironment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "environment_key": o.EnvironmentKey, + "spec": o.Spec, + }) } // Type implements basetypes.ObjectValuable. @@ -4606,52 +2978,16 @@ func (a JobNotificationSettings) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobNotificationSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o JobNotificationSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobNotificationSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobNotificationSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobNotificationSettings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobNotificationSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobNotificationSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobNotificationSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "no_alert_for_canceled_runs": o.NoAlertForCanceledRuns, + "no_alert_for_skipped_runs": o.NoAlertForSkippedRuns, + }) } // Type implements basetypes.ObjectValuable. @@ -4690,52 +3026,17 @@ func (a JobParameter) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobParameter{} - -// Equal implements basetypes.ObjectValuable. -func (o JobParameter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobParameter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobParameter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobParameter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobParameter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobParameter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobParameter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default": o.Default, + "name": o.Name, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -4774,52 +3075,16 @@ func (a JobParameterDefinition) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobParameterDefinition{} - -// Equal implements basetypes.ObjectValuable. -func (o JobParameterDefinition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobParameterDefinition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobParameterDefinition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobParameterDefinition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobParameterDefinition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobParameterDefinition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobParameterDefinition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default": o.Default, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -4859,52 +3124,17 @@ func (a JobPermission) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o JobPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4947,52 +3177,17 @@ func (a JobPermissions) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o JobPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -5031,52 +3226,16 @@ func (a JobPermissionsDescription) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -5108,58 +3267,22 @@ func (newState *JobPermissionsRequest) SyncEffectiveFieldsDuringRead(existingSta // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "access_control_list": reflect.TypeOf(JobAccessControlRequest{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) +func (a JobPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(JobAccessControlRequest{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "job_id": o.JobId, + }) } // Type implements basetypes.ObjectValuable. @@ -5206,52 +3329,16 @@ func (a JobRunAs) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobRunAs{} - -// Equal implements basetypes.ObjectValuable. -func (o JobRunAs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobRunAs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobRunAs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobRunAs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobRunAs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobRunAs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobRunAs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "service_principal_name": o.ServicePrincipalName, + "user_name": o.UserName, + }) } // Type implements basetypes.ObjectValuable. @@ -5402,52 +3489,37 @@ func (a JobSettings) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o JobSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobSettings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobSettings) 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. @@ -5549,52 +3621,17 @@ func (a JobSource) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobSource{} - -// Equal implements basetypes.ObjectValuable. -func (o JobSource) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobSource) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobSource) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobSource) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobSource) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobSource) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobSource) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dirty_state": o.DirtyState, + "import_from_git_branch": o.ImportFromGitBranch, + "job_config_path": o.JobConfigPath, + }) } // Type implements basetypes.ObjectValuable. @@ -5647,52 +3684,17 @@ func (a JobsHealthRule) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobsHealthRule{} - -// Equal implements basetypes.ObjectValuable. -func (o JobsHealthRule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobsHealthRule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobsHealthRule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobsHealthRule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobsHealthRule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobsHealthRule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobsHealthRule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metric": o.Metric, + "op": o.Op, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -5730,52 +3732,15 @@ func (a JobsHealthRules) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobsHealthRules{} - -// Equal implements basetypes.ObjectValuable. -func (o JobsHealthRules) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobsHealthRules) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobsHealthRules) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobsHealthRules) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobsHealthRules) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobsHealthRules) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobsHealthRules) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "rules": o.Rules, + }) } // Type implements basetypes.ObjectValuable. @@ -5821,52 +3786,17 @@ func (a ListJobComplianceForPolicyResponse) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListJobComplianceForPolicyResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListJobComplianceForPolicyResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListJobComplianceForPolicyResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "jobs": o.Jobs, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5912,52 +3842,17 @@ func (a ListJobComplianceRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListJobComplianceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListJobComplianceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListJobComplianceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + "policy_id": o.PolicyId, + }) } // Type implements basetypes.ObjectValuable. @@ -6006,52 +3901,19 @@ func (a ListJobsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListJobsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListJobsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListJobsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListJobsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListJobsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListJobsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListJobsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListJobsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6101,52 +3963,18 @@ func (a ListJobsResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListJobsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListJobsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListJobsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListJobsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListJobsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListJobsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListJobsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListJobsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6220,52 +4048,24 @@ func (a ListRunsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRunsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRunsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRunsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRunsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRunsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRunsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRunsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRunsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6320,52 +4120,18 @@ func (a ListRunsResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRunsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRunsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRunsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRunsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRunsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRunsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRunsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRunsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6411,52 +4177,16 @@ func (a NotebookOutput) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NotebookOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o NotebookOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NotebookOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NotebookOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NotebookOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NotebookOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NotebookOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NotebookOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "result": o.Result, + "truncated": o.Truncated, + }) } // Type implements basetypes.ObjectValuable. @@ -6529,52 +4259,18 @@ func (a NotebookTask) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NotebookTask{} - -// Equal implements basetypes.ObjectValuable. -func (o NotebookTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NotebookTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NotebookTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NotebookTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NotebookTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NotebookTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NotebookTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "base_parameters": o.BaseParameters, + "notebook_path": o.NotebookPath, + "source": o.Source, + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -6615,52 +4311,16 @@ func (a PeriodicTriggerConfiguration) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PeriodicTriggerConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PeriodicTriggerConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PeriodicTriggerConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "interval": o.Interval, + "unit": o.Unit, + }) } // Type implements basetypes.ObjectValuable. @@ -6695,52 +4355,15 @@ func (a PipelineParams) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineParams{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineParams) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineParams) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineParams) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineParams) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineParams) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineParams) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineParams) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_refresh": o.FullRefresh, + }) } // Type implements basetypes.ObjectValuable. @@ -6776,52 +4399,16 @@ func (a PipelineTask) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineTask{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "full_refresh": o.FullRefresh, + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -6870,52 +4457,18 @@ func (a PythonWheelTask) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PythonWheelTask{} - -// Equal implements basetypes.ObjectValuable. -func (o PythonWheelTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PythonWheelTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PythonWheelTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PythonWheelTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PythonWheelTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PythonWheelTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PythonWheelTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "entry_point": o.EntryPoint, + "named_parameters": o.NamedParameters, + "package_name": o.PackageName, + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -6964,52 +4517,16 @@ func (a QueueDetails) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueueDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o QueueDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueueDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueueDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueueDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueueDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueueDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueueDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "code": o.Code, + "message": o.Message, + }) } // Type implements basetypes.ObjectValuable. @@ -7038,58 +4555,21 @@ func (newState *QueueSettings) SyncEffectiveFieldsDuringRead(existingState Queue // the type information of their elements in the Go type system. This function provides a way to // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueueSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o QueueSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueueSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueueSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueueSettings) String() string { - return fmt.Sprintf("%#v", o) +// plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF +// SDK values. +func (a QueueSettings) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueueSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueueSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueueSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + }) } // Type implements basetypes.ObjectValuable. @@ -7142,52 +4622,21 @@ func (a RepairHistoryItem) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepairHistoryItem{} - -// Equal implements basetypes.ObjectValuable. -func (o RepairHistoryItem) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepairHistoryItem) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepairHistoryItem) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepairHistoryItem) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepairHistoryItem) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepairHistoryItem) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepairHistoryItem) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7342,52 +4791,28 @@ func (a RepairRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepairRun{} - -// Equal implements basetypes.ObjectValuable. -func (o RepairRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepairRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepairRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepairRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepairRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepairRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepairRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7456,52 +4881,15 @@ func (a RepairRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepairRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RepairRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepairRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepairRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepairRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepairRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepairRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepairRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repair_id": o.RepairId, + }) } // Type implements basetypes.ObjectValuable. @@ -7543,52 +4931,16 @@ func (a ResetJob) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResetJob{} - -// Equal implements basetypes.ObjectValuable. -func (o ResetJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResetJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResetJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResetJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResetJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResetJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResetJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + "new_settings": o.NewSettings, + }) } // Type implements basetypes.ObjectValuable. @@ -7623,52 +4975,13 @@ func (a ResetResponse) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResetResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ResetResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResetResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResetResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResetResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResetResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResetResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResetResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7701,52 +5014,16 @@ func (a ResolvedConditionTaskValues) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedConditionTaskValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedConditionTaskValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedConditionTaskValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "left": o.Left, + "right": o.Right, + }) } // Type implements basetypes.ObjectValuable. @@ -7782,52 +5059,15 @@ func (a ResolvedDbtTaskValues) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedDbtTaskValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedDbtTaskValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedDbtTaskValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "commands": o.Commands, + }) } // Type implements basetypes.ObjectValuable. @@ -7864,52 +5104,15 @@ func (a ResolvedNotebookTaskValues) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedNotebookTaskValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedNotebookTaskValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedNotebookTaskValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "base_parameters": o.BaseParameters, + }) } // Type implements basetypes.ObjectValuable. @@ -7946,52 +5149,15 @@ func (a ResolvedParamPairValues) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedParamPairValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedParamPairValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedParamPairValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -8031,52 +5197,16 @@ func (a ResolvedPythonWheelTaskValues) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedPythonWheelTaskValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedPythonWheelTaskValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedPythonWheelTaskValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "named_parameters": o.NamedParameters, + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -8119,52 +5249,16 @@ func (a ResolvedRunJobTaskValues) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedRunJobTaskValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedRunJobTaskValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedRunJobTaskValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_parameters": o.JobParameters, + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -8204,52 +5298,15 @@ func (a ResolvedStringParamsValues) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedStringParamsValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedStringParamsValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedStringParamsValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -8313,52 +5370,24 @@ func (a ResolvedValues) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResolvedValues{} - -// Equal implements basetypes.ObjectValuable. -func (o ResolvedValues) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResolvedValues) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResolvedValues) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResolvedValues) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResolvedValues) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResolvedValues) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResolvedValues) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8566,52 +5595,47 @@ func (a Run) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Run{} - -// Equal implements basetypes.ObjectValuable. -func (o Run) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Run) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Run) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Run) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Run) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Run) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Run) 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. @@ -8721,52 +5745,18 @@ func (a RunConditionTask) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunConditionTask{} - -// Equal implements basetypes.ObjectValuable. -func (o RunConditionTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunConditionTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunConditionTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunConditionTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunConditionTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunConditionTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunConditionTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "left": o.Left, + "op": o.Op, + "outcome": o.Outcome, + "right": o.Right, + }) } // Type implements basetypes.ObjectValuable. @@ -8816,52 +5806,18 @@ func (a RunForEachTask) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunForEachTask{} - -// Equal implements basetypes.ObjectValuable. -func (o RunForEachTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunForEachTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunForEachTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunForEachTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunForEachTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunForEachTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunForEachTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "concurrency": o.Concurrency, + "inputs": o.Inputs, + "stats": o.Stats, + "task": o.Task, + }) } // Type implements basetypes.ObjectValuable. @@ -8902,52 +5858,15 @@ func (a RunJobOutput) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunJobOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o RunJobOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunJobOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunJobOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunJobOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunJobOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunJobOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunJobOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -9075,52 +5994,24 @@ func (a RunJobTask) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunJobTask{} - -// Equal implements basetypes.ObjectValuable. -func (o RunJobTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunJobTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunJobTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunJobTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunJobTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunJobTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunJobTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9292,58 +6183,33 @@ func (a RunNow) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ "pipeline_params": reflect.TypeOf(PipelineParams{}), "python_named_params": reflect.TypeOf(types.String{}), "python_params": reflect.TypeOf(types.String{}), - "queue": reflect.TypeOf(QueueSettings{}), - "spark_submit_params": reflect.TypeOf(types.String{}), - "sql_params": reflect.TypeOf(types.String{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunNow{} - -// Equal implements basetypes.ObjectValuable. -func (o RunNow) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunNow) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunNow) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunNow) String() string { - return fmt.Sprintf("%#v", o) + "queue": reflect.TypeOf(QueueSettings{}), + "spark_submit_params": reflect.TypeOf(types.String{}), + "sql_params": reflect.TypeOf(types.String{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunNow) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunNow) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunNow) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9415,52 +6281,16 @@ func (a RunNowResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunNowResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RunNowResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunNowResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunNowResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunNowResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunNowResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunNowResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunNowResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "number_in_job": o.NumberInJob, + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -9536,52 +6366,24 @@ func (a RunOutput) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o RunOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9723,52 +6525,22 @@ func (a RunParameters) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunParameters{} - -// Equal implements basetypes.ObjectValuable. -func (o RunParameters) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunParameters) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunParameters) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunParameters) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunParameters) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunParameters) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunParameters) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9838,52 +6610,19 @@ func (a RunState) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunState{} - -// Equal implements basetypes.ObjectValuable. -func (o RunState) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunState) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunState) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunState) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunState) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunState) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunState) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9930,52 +6669,17 @@ func (a RunStatus) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o RunStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "queue_details": o.QueueDetails, + "state": o.State, + "termination_details": o.TerminationDetails, + }) } // Type implements basetypes.ObjectValuable. @@ -10072,7 +6776,7 @@ 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 compute.ClusterSpec `tfsdk:"new_cluster" tf:"optional,object"` + 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 @@ -10201,52 +6905,53 @@ func (a RunTask) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunTask{} - -// Equal implements basetypes.ObjectValuable. -func (o RunTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunTask) 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. @@ -10378,52 +7083,17 @@ func (a SparkJarTask) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkJarTask{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkJarTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkJarTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkJarTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkJarTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkJarTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkJarTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkJarTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "jar_uri": o.JarUri, + "main_class_name": o.MainClassName, + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -10484,52 +7154,17 @@ func (a SparkPythonTask) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkPythonTask{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkPythonTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkPythonTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkPythonTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkPythonTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkPythonTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkPythonTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkPythonTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parameters": o.Parameters, + "python_file": o.PythonFile, + "source": o.Source, + }) } // Type implements basetypes.ObjectValuable. @@ -10574,52 +7209,15 @@ func (a SparkSubmitTask) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparkSubmitTask{} - -// Equal implements basetypes.ObjectValuable. -func (o SparkSubmitTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparkSubmitTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparkSubmitTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparkSubmitTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparkSubmitTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparkSubmitTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparkSubmitTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "parameters": o.Parameters, + }) } // Type implements basetypes.ObjectValuable. @@ -10670,52 +7268,19 @@ func (a SqlAlertOutput) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlAlertOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlAlertOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlAlertOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlAlertOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlAlertOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlAlertOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlAlertOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlAlertOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10759,52 +7324,16 @@ func (a SqlDashboardOutput) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlDashboardOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlDashboardOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlDashboardOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + "widgets": o.Widgets, + }) } // Type implements basetypes.ObjectValuable. @@ -10855,52 +7384,21 @@ func (a SqlDashboardWidgetOutput) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlDashboardWidgetOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlDashboardWidgetOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlDashboardWidgetOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10950,52 +7448,17 @@ func (a SqlOutput) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert_output": o.AlertOutput, + "dashboard_output": o.DashboardOutput, + "query_output": o.QueryOutput, + }) } // Type implements basetypes.ObjectValuable. @@ -11037,52 +7500,15 @@ func (a SqlOutputError) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlOutputError{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlOutputError) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlOutputError) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlOutputError) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlOutputError) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlOutputError) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlOutputError) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlOutputError) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + }) } // Type implements basetypes.ObjectValuable. @@ -11126,52 +7552,19 @@ func (a SqlQueryOutput) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlQueryOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlQueryOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlQueryOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlQueryOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlQueryOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlQueryOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlQueryOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlQueryOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11211,52 +7604,15 @@ func (a SqlStatementOutput) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlStatementOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlStatementOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlStatementOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlStatementOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlStatementOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlStatementOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlStatementOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlStatementOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "lookup_key": o.LookupKey, + }) } // Type implements basetypes.ObjectValuable. @@ -11311,52 +7667,20 @@ func (a SqlTask) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTask{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTask) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11411,52 +7735,17 @@ func (a SqlTaskAlert) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTaskAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTaskAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTaskAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTaskAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTaskAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTaskAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTaskAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTaskAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert_id": o.AlertId, + "pause_subscriptions": o.PauseSubscriptions, + "subscriptions": o.Subscriptions, + }) } // Type implements basetypes.ObjectValuable. @@ -11497,58 +7786,24 @@ func (newState *SqlTaskDashboard) SyncEffectiveFieldsDuringRead(existingState Sq // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "subscriptions": reflect.TypeOf(SqlTaskSubscription{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTaskDashboard{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) String() string { - return fmt.Sprintf("%#v", o) +func (a SqlTaskDashboard) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{ + "subscriptions": reflect.TypeOf(SqlTaskSubscription{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTaskDashboard) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTaskDashboard) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "custom_subject": o.CustomSubject, + "dashboard_id": o.DashboardId, + "pause_subscriptions": o.PauseSubscriptions, + "subscriptions": o.Subscriptions, + }) } // Type implements basetypes.ObjectValuable. @@ -11597,52 +7852,16 @@ func (a SqlTaskFile) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTaskFile{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTaskFile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTaskFile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTaskFile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTaskFile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTaskFile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTaskFile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTaskFile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + "source": o.Source, + }) } // Type implements basetypes.ObjectValuable. @@ -11677,52 +7896,15 @@ func (a SqlTaskQuery) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTaskQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTaskQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTaskQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTaskQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTaskQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTaskQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTaskQuery) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTaskQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query_id": o.QueryId, + }) } // Type implements basetypes.ObjectValuable. @@ -11763,52 +7945,16 @@ func (a SqlTaskSubscription) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SqlTaskSubscription{} - -// Equal implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SqlTaskSubscription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SqlTaskSubscription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination_id": o.DestinationId, + "user_name": o.UserName, + }) } // Type implements basetypes.ObjectValuable. @@ -11911,52 +8057,28 @@ func (a SubmitRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SubmitRun{} - -// Equal implements basetypes.ObjectValuable. -func (o SubmitRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SubmitRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SubmitRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SubmitRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SubmitRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SubmitRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SubmitRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12024,52 +8146,15 @@ func (a SubmitRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SubmitRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SubmitRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SubmitRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SubmitRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SubmitRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SubmitRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SubmitRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SubmitRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -12120,7 +8205,7 @@ type SubmitTask struct { Libraries types.List `tfsdk:"library" tf:"optional"` // If new_cluster, a description of a new cluster that is created for each // run. - NewCluster compute.ClusterSpec `tfsdk:"new_cluster" tf:"optional,object"` + 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 @@ -12217,52 +8302,38 @@ func (a SubmitTask) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SubmitTask{} - -// Equal implements basetypes.ObjectValuable. -func (o SubmitTask) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SubmitTask) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SubmitTask) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SubmitTask) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SubmitTask) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SubmitTask) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SubmitTask) 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. @@ -12369,52 +8440,18 @@ func (a TableUpdateTriggerConfiguration) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableUpdateTriggerConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableUpdateTriggerConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableUpdateTriggerConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12485,7 +8522,7 @@ 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 compute.ClusterSpec `tfsdk:"new_cluster" tf:"optional,object"` + 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 @@ -12590,52 +8627,43 @@ func (a Task) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Task{} - -// Equal implements basetypes.ObjectValuable. -func (o Task) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Task) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Task) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Task) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Task) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Task) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Task) 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. @@ -12736,52 +8764,16 @@ func (a TaskDependency) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TaskDependency{} - -// Equal implements basetypes.ObjectValuable. -func (o TaskDependency) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TaskDependency) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TaskDependency) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TaskDependency) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TaskDependency) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TaskDependency) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TaskDependency) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "outcome": o.Outcome, + "task_key": o.TaskKey, + }) } // Type implements basetypes.ObjectValuable. @@ -12853,52 +8845,20 @@ func (a TaskEmailNotifications) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TaskEmailNotifications{} - -// Equal implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TaskEmailNotifications) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TaskEmailNotifications) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12955,52 +8915,17 @@ func (a TaskNotificationSettings) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TaskNotificationSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TaskNotificationSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TaskNotificationSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13092,52 +9017,17 @@ func (a TerminationDetails) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TerminationDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o TerminationDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TerminationDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TerminationDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TerminationDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TerminationDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TerminationDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TerminationDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "code": o.Code, + "message": o.Message, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -13174,52 +9064,15 @@ func (a TriggerInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TriggerInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o TriggerInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TriggerInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TriggerInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TriggerInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TriggerInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TriggerInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TriggerInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -13266,52 +9119,19 @@ func (a TriggerSettings) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TriggerSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o TriggerSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TriggerSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TriggerSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TriggerSettings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TriggerSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TriggerSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TriggerSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13376,52 +9196,17 @@ func (a UpdateJob) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateJob{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateJob) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateJob) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateJob) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateJob) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateJob) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateJob) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateJob) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "fields_to_remove": o.FieldsToRemove, + "job_id": o.JobId, + "new_settings": o.NewSettings, + }) } // Type implements basetypes.ObjectValuable. @@ -13459,52 +9244,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -13542,52 +9288,17 @@ func (a ViewItem) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ViewItem{} - -// Equal implements basetypes.ObjectValuable. -func (o ViewItem) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ViewItem) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ViewItem) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ViewItem) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ViewItem) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ViewItem) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ViewItem) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "name": o.Name, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -13622,52 +9333,15 @@ func (a Webhook) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Webhook{} - -// Equal implements basetypes.ObjectValuable. -func (o Webhook) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Webhook) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Webhook) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Webhook) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Webhook) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Webhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Webhook) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -13729,52 +9403,19 @@ func (a WebhookNotifications) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WebhookNotifications{} - -// Equal implements basetypes.ObjectValuable. -func (o WebhookNotifications) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WebhookNotifications) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WebhookNotifications) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WebhookNotifications) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WebhookNotifications) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WebhookNotifications) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WebhookNotifications) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. diff --git a/internal/service/marketplace_tf/model.go b/internal/service/marketplace_tf/model.go index 544b00749..8d05f64f8 100755 --- a/internal/service/marketplace_tf/model.go +++ b/internal/service/marketplace_tf/model.go @@ -12,15 +12,11 @@ package marketplace_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AddExchangeForListingRequest struct { @@ -46,52 +42,16 @@ func (a AddExchangeForListingRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddExchangeForListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddExchangeForListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddExchangeForListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "listing_id": o.ListingId, + }) } // Type implements basetypes.ObjectValuable. @@ -127,52 +87,15 @@ func (a AddExchangeForListingResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AddExchangeForListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AddExchangeForListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AddExchangeForListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_for_listing": o.ExchangeForListing, + }) } // Type implements basetypes.ObjectValuable. @@ -210,52 +133,15 @@ func (a BatchGetListingsRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BatchGetListingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BatchGetListingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BatchGetListingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ids": o.Ids, + }) } // Type implements basetypes.ObjectValuable. @@ -292,52 +178,15 @@ func (a BatchGetListingsResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BatchGetListingsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BatchGetListingsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BatchGetListingsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listings": o.Listings, + }) } // Type implements basetypes.ObjectValuable. @@ -375,52 +224,15 @@ func (a BatchGetProvidersRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BatchGetProvidersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BatchGetProvidersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BatchGetProvidersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ids": o.Ids, + }) } // Type implements basetypes.ObjectValuable. @@ -457,52 +269,15 @@ func (a BatchGetProvidersResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BatchGetProvidersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BatchGetProvidersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BatchGetProvidersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "providers": o.Providers, + }) } // Type implements basetypes.ObjectValuable. @@ -537,52 +312,15 @@ func (a ConsumerTerms) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ConsumerTerms{} - -// Equal implements basetypes.ObjectValuable. -func (o ConsumerTerms) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ConsumerTerms) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ConsumerTerms) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ConsumerTerms) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ConsumerTerms) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ConsumerTerms) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ConsumerTerms) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -623,52 +361,18 @@ func (a ContactInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ContactInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ContactInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ContactInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ContactInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ContactInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ContactInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ContactInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ContactInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "company": o.Company, + "email": o.Email, + "first_name": o.FirstName, + "last_name": o.LastName, + }) } // Type implements basetypes.ObjectValuable. @@ -706,52 +410,15 @@ func (a CreateExchangeFilterRequest) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExchangeFilterRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeFilterRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExchangeFilterRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + }) } // Type implements basetypes.ObjectValuable. @@ -786,52 +453,15 @@ func (a CreateExchangeFilterResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExchangeFilterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeFilterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExchangeFilterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter_id": o.FilterId, + }) } // Type implements basetypes.ObjectValuable. @@ -866,52 +496,15 @@ func (a CreateExchangeRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExchangeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExchangeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange": o.Exchange, + }) } // Type implements basetypes.ObjectValuable. @@ -946,52 +539,15 @@ func (a CreateExchangeResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExchangeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExchangeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExchangeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + }) } // Type implements basetypes.ObjectValuable. @@ -1032,52 +588,18 @@ func (a CreateFileRequest) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateFileRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateFileRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateFileRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateFileRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateFileRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateFileRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateFileRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateFileRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1119,52 +641,16 @@ func (a CreateFileResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateFileResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateFileResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateFileResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateFileResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateFileResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateFileResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateFileResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateFileResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_info": o.FileInfo, + "upload_url": o.UploadUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -1213,52 +699,20 @@ func (a CreateInstallationRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateInstallationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateInstallationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateInstallationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1302,52 +756,15 @@ func (a CreateListingRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing": o.Listing, + }) } // Type implements basetypes.ObjectValuable. @@ -1382,52 +799,15 @@ func (a CreateListingResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + }) } // Type implements basetypes.ObjectValuable. @@ -1479,52 +859,23 @@ func (a CreatePersonalizationRequest) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePersonalizationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePersonalizationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1567,52 +918,15 @@ func (a CreatePersonalizationRequestResponse) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePersonalizationRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePersonalizationRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePersonalizationRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1647,52 +961,15 @@ func (a CreateProviderRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "provider": o.Provider, + }) } // Type implements basetypes.ObjectValuable. @@ -1727,52 +1004,15 @@ func (a CreateProviderResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateProviderResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateProviderResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateProviderResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateProviderResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateProviderResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateProviderResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateProviderResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateProviderResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1807,52 +1047,16 @@ func (a DataRefreshInfo) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataRefreshInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o DataRefreshInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataRefreshInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataRefreshInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataRefreshInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataRefreshInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataRefreshInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataRefreshInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "interval": o.Interval, + "unit": o.Unit, + }) } // Type implements basetypes.ObjectValuable. @@ -1887,52 +1091,15 @@ func (a DeleteExchangeFilterRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExchangeFilterRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeFilterRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -1964,52 +1131,13 @@ func (a DeleteExchangeFilterResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExchangeFilterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeFilterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExchangeFilterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2041,52 +1169,15 @@ func (a DeleteExchangeRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExchangeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExchangeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2118,52 +1209,13 @@ func (a DeleteExchangeResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExchangeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExchangeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExchangeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2195,52 +1247,15 @@ func (a DeleteFileRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteFileRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteFileRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteFileRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteFileRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteFileRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteFileRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteFileRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteFileRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_id": o.FileId, + }) } // Type implements basetypes.ObjectValuable. @@ -2272,52 +1287,13 @@ func (a DeleteFileResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteFileResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteFileResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteFileResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteFileResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteFileResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteFileResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteFileResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteFileResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2351,52 +1327,16 @@ func (a DeleteInstallationRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteInstallationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteInstallationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteInstallationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installation_id": o.InstallationId, + "listing_id": o.ListingId, + }) } // Type implements basetypes.ObjectValuable. @@ -2429,52 +1369,13 @@ func (a DeleteInstallationResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteInstallationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteInstallationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteInstallationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2506,52 +1407,15 @@ func (a DeleteListingRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2583,52 +1447,13 @@ func (a DeleteListingResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2660,52 +1485,15 @@ func (a DeleteProviderRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2737,52 +1525,13 @@ func (a DeleteProviderResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteProviderResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteProviderResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2829,55 +1578,26 @@ func (a Exchange) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{ "filters": reflect.TypeOf(ExchangeFilter{}), "linked_listings": reflect.TypeOf(ExchangeListing{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Exchange{} - -// Equal implements basetypes.ObjectValuable. -func (o Exchange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Exchange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Exchange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Exchange) String() string { - return fmt.Sprintf("%#v", o) + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o Exchange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Exchange) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Exchange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2938,52 +1658,23 @@ func (a ExchangeFilter) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExchangeFilter{} - -// Equal implements basetypes.ObjectValuable. -func (o ExchangeFilter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExchangeFilter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExchangeFilter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExchangeFilter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExchangeFilter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExchangeFilter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExchangeFilter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3036,52 +1727,21 @@ func (a ExchangeListing) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExchangeListing{} - -// Equal implements basetypes.ObjectValuable. -func (o ExchangeListing) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExchangeListing) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExchangeListing) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExchangeListing) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExchangeListing) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExchangeListing) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExchangeListing) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3141,52 +1801,24 @@ func (a FileInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o FileInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, FileInfo +// only implements ToObjectValue() and Type(). +func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3232,52 +1864,16 @@ func (a FileParent) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileParent{} - -// Equal implements basetypes.ObjectValuable. -func (o FileParent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileParent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileParent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileParent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileParent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FileParent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileParent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_parent_type": o.FileParentType, + "parent_id": o.ParentId, + }) } // Type implements basetypes.ObjectValuable. @@ -3312,52 +1908,15 @@ func (a GetExchangeRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExchangeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExchangeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExchangeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExchangeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExchangeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExchangeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExchangeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExchangeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3392,52 +1951,15 @@ func (a GetExchangeResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExchangeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExchangeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExchangeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExchangeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExchangeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExchangeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExchangeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExchangeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange": o.Exchange, + }) } // Type implements basetypes.ObjectValuable. @@ -3473,52 +1995,15 @@ func (a GetFileRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetFileRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetFileRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetFileRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetFileRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetFileRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetFileRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetFileRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetFileRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_id": o.FileId, + }) } // Type implements basetypes.ObjectValuable. @@ -3553,52 +2038,15 @@ func (a GetFileResponse) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetFileResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetFileResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetFileResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetFileResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetFileResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetFileResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetFileResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetFileResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_info": o.FileInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -3634,52 +2082,15 @@ func (a GetLatestVersionProviderAnalyticsDashboardResponse) GetComplexFieldTypes return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetLatestVersionProviderAnalyticsDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetLatestVersionProviderAnalyticsDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -3717,52 +2128,17 @@ func (a GetListingContentMetadataRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingContentMetadataRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingContentMetadataRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingContentMetadataRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -3801,52 +2177,16 @@ func (a GetListingContentMetadataResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingContentMetadataResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingContentMetadataResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingContentMetadataResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shared_data_objects": o.SharedDataObjects, + }) } // Type implements basetypes.ObjectValuable. @@ -3883,52 +2223,15 @@ func (a GetListingRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3963,52 +2266,15 @@ func (a GetListingResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing": o.Listing, + }) } // Type implements basetypes.ObjectValuable. @@ -4046,52 +2312,16 @@ func (a GetListingsRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -4129,52 +2359,16 @@ func (a GetListingsResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetListingsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetListingsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetListingsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetListingsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetListingsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetListingsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetListingsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetListingsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -4211,52 +2405,15 @@ func (a GetPersonalizationRequestRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPersonalizationRequestRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPersonalizationRequestRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + }) } // Type implements basetypes.ObjectValuable. @@ -4291,52 +2448,15 @@ func (a GetPersonalizationRequestResponse) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPersonalizationRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPersonalizationRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPersonalizationRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "personalization_requests": o.PersonalizationRequests, + }) } // Type implements basetypes.ObjectValuable. @@ -4372,52 +2492,15 @@ func (a GetProviderRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -4452,52 +2535,15 @@ func (a GetProviderResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetProviderResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetProviderResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetProviderResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetProviderResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetProviderResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetProviderResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetProviderResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetProviderResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "provider": o.Provider, + }) } // Type implements basetypes.ObjectValuable. @@ -4530,56 +2576,19 @@ func (newState *Installation) SyncEffectiveFieldsDuringRead(existingState Instal // SDK values. func (a Installation) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "installation": reflect.TypeOf(InstallationDetail{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Installation{} - -// Equal implements basetypes.ObjectValuable. -func (o Installation) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false + "installation": reflect.TypeOf(InstallationDetail{}), } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Installation) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Installation) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Installation) String() string { - return fmt.Sprintf("%#v", o) } -// ToObjectValue implements basetypes.ObjectValuable. -func (o Installation) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Installation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Installation) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installation": o.Installation, + }) } // Type implements basetypes.ObjectValuable. @@ -4641,52 +2650,27 @@ func (a InstallationDetail) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InstallationDetail{} - -// Equal implements basetypes.ObjectValuable. -func (o InstallationDetail) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InstallationDetail) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InstallationDetail) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InstallationDetail) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InstallationDetail) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InstallationDetail) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InstallationDetail) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4738,52 +2722,16 @@ func (a ListAllInstallationsRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAllInstallationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAllInstallationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAllInstallationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -4821,52 +2769,16 @@ func (a ListAllInstallationsResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAllInstallationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAllInstallationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAllInstallationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installations": o.Installations, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -4905,52 +2817,16 @@ func (a ListAllPersonalizationRequestsRequest) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAllPersonalizationRequestsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAllPersonalizationRequestsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -4988,52 +2864,16 @@ func (a ListAllPersonalizationRequestsResponse) GetComplexFieldTypes(ctx context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAllPersonalizationRequestsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAllPersonalizationRequestsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAllPersonalizationRequestsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "personalization_requests": o.PersonalizationRequests, + }) } // Type implements basetypes.ObjectValuable. @@ -5074,52 +2914,17 @@ func (a ListExchangeFiltersRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangeFiltersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangeFiltersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangeFiltersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5158,52 +2963,16 @@ func (a ListExchangeFiltersResponse) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangeFiltersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangeFiltersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangeFiltersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filters": o.Filters, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5244,52 +3013,17 @@ func (a ListExchangesForListingRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangesForListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangesForListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangesForListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5328,52 +3062,16 @@ func (a ListExchangesForListingResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangesForListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangesForListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangesForListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_listing": o.ExchangeListing, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5412,52 +3110,16 @@ func (a ListExchangesRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5495,52 +3157,16 @@ func (a ListExchangesResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExchangesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExchangesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExchangesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExchangesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExchangesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExchangesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExchangesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExchangesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchanges": o.Exchanges, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5583,52 +3209,17 @@ func (a ListFilesRequest) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFilesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFilesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFilesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFilesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFilesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFilesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFilesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFilesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_parent": o.FileParent, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5669,52 +3260,16 @@ func (a ListFilesResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFilesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFilesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFilesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFilesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFilesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFilesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFilesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFilesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_infos": o.FileInfos, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5755,52 +3310,17 @@ func (a ListFulfillmentsRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFulfillmentsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFulfillmentsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFulfillmentsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5839,52 +3359,16 @@ func (a ListFulfillmentsResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListFulfillmentsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListFulfillmentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListFulfillmentsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "fulfillments": o.Fulfillments, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5925,52 +3409,17 @@ func (a ListInstallationsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListInstallationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListInstallationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListInstallationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing_id": o.ListingId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6009,52 +3458,16 @@ func (a ListInstallationsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListInstallationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListInstallationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListInstallationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installations": o.Installations, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6095,52 +3508,17 @@ func (a ListListingsForExchangeRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListListingsForExchangeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListListingsForExchangeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListListingsForExchangeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_id": o.ExchangeId, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6175,56 +3553,20 @@ func (newState *ListListingsForExchangeResponse) SyncEffectiveFieldsDuringRead(e // SDK values. func (a ListListingsForExchangeResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "exchange_listings": reflect.TypeOf(ExchangeListing{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListListingsForExchangeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) String() string { - return fmt.Sprintf("%#v", o) + "exchange_listings": reflect.TypeOf(ExchangeListing{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListListingsForExchangeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListListingsForExchangeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange_listings": o.ExchangeListings, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6283,52 +3625,23 @@ func (a ListListingsRequest) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListListingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListListingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListListingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListListingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListListingsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListListingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListListingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListListingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6381,52 +3694,16 @@ func (a ListListingsResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListListingsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListListingsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListListingsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListListingsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListListingsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListListingsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListListingsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListListingsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6467,52 +3744,17 @@ func (a ListProviderAnalyticsDashboardResponse) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProviderAnalyticsDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProviderAnalyticsDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "id": o.Id, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -6552,52 +3794,17 @@ func (a ListProvidersRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProvidersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProvidersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProvidersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProvidersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProvidersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProvidersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProvidersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProvidersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_featured": o.IsFeatured, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -6636,52 +3843,16 @@ func (a ListProvidersResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProvidersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProvidersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProvidersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProvidersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProvidersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProvidersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProvidersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProvidersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "providers": o.Providers, + }) } // Type implements basetypes.ObjectValuable. @@ -6724,52 +3895,17 @@ func (a Listing) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Listing{} - -// Equal implements basetypes.ObjectValuable. -func (o Listing) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Listing) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Listing) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Listing) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Listing) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Listing) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Listing) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "detail": o.Detail, + "id": o.Id, + "summary": o.Summary, + }) } // Type implements basetypes.ObjectValuable. @@ -6862,52 +3998,33 @@ func (a ListingDetail) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListingDetail{} - -// Equal implements basetypes.ObjectValuable. -func (o ListingDetail) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListingDetail) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListingDetail) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListingDetail) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListingDetail) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListingDetail) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListingDetail) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6981,52 +4098,19 @@ func (a ListingFulfillment) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListingFulfillment{} - -// Equal implements basetypes.ObjectValuable. -func (o ListingFulfillment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListingFulfillment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListingFulfillment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListingFulfillment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListingFulfillment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListingFulfillment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListingFulfillment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7067,52 +4151,15 @@ func (a ListingSetting) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListingSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o ListingSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListingSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListingSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListingSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListingSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListingSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListingSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "visibility": o.Visibility, + }) } // Type implements basetypes.ObjectValuable. @@ -7190,52 +4237,33 @@ func (a ListingSummary) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListingSummary{} - -// Equal implements basetypes.ObjectValuable. -func (o ListingSummary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListingSummary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListingSummary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListingSummary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListingSummary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListingSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListingSummary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7304,52 +4332,16 @@ func (a ListingTag) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListingTag{} - -// Equal implements basetypes.ObjectValuable. -func (o ListingTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListingTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListingTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListingTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListingTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListingTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListingTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "tag_name": o.TagName, + "tag_values": o.TagValues, + }) } // Type implements basetypes.ObjectValuable. @@ -7420,52 +4412,30 @@ func (a PersonalizationRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PersonalizationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PersonalizationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PersonalizationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PersonalizationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PersonalizationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PersonalizationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PersonalizationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PersonalizationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7519,52 +4489,15 @@ func (a ProviderAnalyticsDashboard) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProviderAnalyticsDashboard{} - -// Equal implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProviderAnalyticsDashboard) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProviderAnalyticsDashboard) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -7623,52 +4556,28 @@ func (a ProviderInfo) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProviderInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ProviderInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProviderInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProviderInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProviderInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProviderInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProviderInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProviderInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7716,52 +4625,16 @@ func (a RegionInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegionInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RegionInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegionInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegionInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegionInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegionInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegionInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegionInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cloud": o.Cloud, + "region": o.Region, + }) } // Type implements basetypes.ObjectValuable. @@ -7796,52 +4669,15 @@ func (a RemoveExchangeForListingRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RemoveExchangeForListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RemoveExchangeForListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -7873,52 +4709,13 @@ func (a RemoveExchangeForListingResponse) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RemoveExchangeForListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RemoveExchangeForListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RemoveExchangeForListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7950,52 +4747,15 @@ func (a RepoInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "git_repo_url": o.GitRepoUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -8033,52 +4793,16 @@ func (a RepoInstallation) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoInstallation{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoInstallation) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoInstallation) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoInstallation) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoInstallation) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoInstallation) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoInstallation) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoInstallation) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repo_name": o.RepoName, + "repo_path": o.RepoPath, + }) } // Type implements basetypes.ObjectValuable. @@ -8132,52 +4856,22 @@ func (a SearchListingsRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchListingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchListingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchListingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchListingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchListingsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchListingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchListingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchListingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8227,52 +4921,16 @@ func (a SearchListingsResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchListingsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchListingsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchListingsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchListingsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchListingsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchListingsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchListingsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchListingsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listings": o.Listings, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -8310,52 +4968,16 @@ func (a ShareInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ShareInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ShareInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ShareInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ShareInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ShareInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ShareInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ShareInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ShareInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -8393,52 +5015,16 @@ func (a SharedDataObject) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SharedDataObject{} - -// Equal implements basetypes.ObjectValuable. -func (o SharedDataObject) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SharedDataObject) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SharedDataObject) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SharedDataObject) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SharedDataObject) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SharedDataObject) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SharedDataObject) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data_object_type": o.DataObjectType, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -8480,52 +5066,18 @@ func (a TokenDetail) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenDetail{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenDetail) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenDetail) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenDetail) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenDetail) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenDetail) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenDetail) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenDetail) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bearerToken": o.BearerToken, + "endpoint": o.Endpoint, + "expirationTime": o.ExpirationTime, + "shareCredentialsVersion": o.ShareCredentialsVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -8575,52 +5127,21 @@ func (a TokenInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8663,52 +5184,16 @@ func (a UpdateExchangeFilterRequest) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExchangeFilterRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeFilterRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -8746,52 +5231,15 @@ func (a UpdateExchangeFilterResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExchangeFilterResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeFilterResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExchangeFilterResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + }) } // Type implements basetypes.ObjectValuable. @@ -8830,52 +5278,16 @@ func (a UpdateExchangeRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExchangeRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExchangeRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange": o.Exchange, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -8913,52 +5325,15 @@ func (a UpdateExchangeResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExchangeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExchangeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExchangeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exchange": o.Exchange, + }) } // Type implements basetypes.ObjectValuable. @@ -9001,52 +5376,18 @@ func (a UpdateInstallationRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateInstallationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateInstallationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateInstallationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installation": o.Installation, + "installation_id": o.InstallationId, + "listing_id": o.ListingId, + "rotate_token": o.RotateToken, + }) } // Type implements basetypes.ObjectValuable. @@ -9086,52 +5427,15 @@ func (a UpdateInstallationResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateInstallationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateInstallationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateInstallationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "installation": o.Installation, + }) } // Type implements basetypes.ObjectValuable. @@ -9170,52 +5474,16 @@ func (a UpdateListingRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateListingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateListingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateListingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateListingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateListingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateListingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateListingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateListingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "listing": o.Listing, + }) } // Type implements basetypes.ObjectValuable. @@ -9253,52 +5521,15 @@ func (a UpdateListingResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateListingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateListingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateListingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateListingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateListingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateListingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateListingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateListingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "listing": o.Listing, + }) } // Type implements basetypes.ObjectValuable. @@ -9343,52 +5574,19 @@ func (a UpdatePersonalizationRequestRequest) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePersonalizationRequestRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalizationRequestRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9429,52 +5627,15 @@ func (a UpdatePersonalizationRequestResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePersonalizationRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalizationRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePersonalizationRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "request": o.Request, + }) } // Type implements basetypes.ObjectValuable. @@ -9514,52 +5675,16 @@ func (a UpdateProviderAnalyticsDashboardRequest) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateProviderAnalyticsDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderAnalyticsDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -9598,52 +5723,17 @@ func (a UpdateProviderAnalyticsDashboardResponse) GetComplexFieldTypes(ctx conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateProviderAnalyticsDashboardResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderAnalyticsDashboardResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateProviderAnalyticsDashboardResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "id": o.Id, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -9682,52 +5772,16 @@ func (a UpdateProviderRequest) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "provider": o.Provider, + }) } // Type implements basetypes.ObjectValuable. @@ -9765,52 +5819,15 @@ func (a UpdateProviderResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateProviderResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateProviderResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateProviderResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "provider": o.Provider, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/ml_tf/model.go b/internal/service/ml_tf/model.go index 976dfbe65..65207e13a 100755 --- a/internal/service/ml_tf/model.go +++ b/internal/service/ml_tf/model.go @@ -12,15 +12,11 @@ package ml_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) // Activity recorded for the action. @@ -96,52 +92,23 @@ func (a Activity) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Activity{} - -// Equal implements basetypes.ObjectValuable. -func (o Activity) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Activity) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Activity) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Activity) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Activity) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Activity) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Activity) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -200,52 +167,19 @@ func (a ApproveTransitionRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ApproveTransitionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ApproveTransitionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ApproveTransitionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -285,52 +219,15 @@ func (a ApproveTransitionRequestResponse) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ApproveTransitionRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ApproveTransitionRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ApproveTransitionRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "activity": o.Activity, + }) } // Type implements basetypes.ObjectValuable. @@ -379,52 +276,20 @@ func (a CommentObject) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CommentObject{} - -// Equal implements basetypes.ObjectValuable. -func (o CommentObject) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CommentObject) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CommentObject) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CommentObject) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CommentObject) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CommentObject) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CommentObject) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -469,52 +334,17 @@ func (a CreateComment) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateComment{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateComment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateComment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateComment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateComment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateComment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateComment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateComment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -552,52 +382,15 @@ func (a CreateCommentResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCommentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCommentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCommentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCommentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCommentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCommentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCommentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCommentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + }) } // Type implements basetypes.ObjectValuable. @@ -644,52 +437,17 @@ func (a CreateExperiment) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExperiment{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExperiment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExperiment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExperiment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExperiment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExperiment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExperiment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExperiment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact_location": o.ArtifactLocation, + "name": o.Name, + "tags": o.Tags, + }) } // Type implements basetypes.ObjectValuable. @@ -727,52 +485,15 @@ func (a CreateExperimentResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateExperimentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateExperimentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateExperimentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -812,52 +533,17 @@ func (a CreateModelRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "tags": o.Tags, + }) } // Type implements basetypes.ObjectValuable. @@ -896,52 +582,15 @@ func (a CreateModelResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) } // Type implements basetypes.ObjectValuable. @@ -991,52 +640,20 @@ func (a CreateModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1079,52 +696,15 @@ func (a CreateModelVersionResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateModelVersionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateModelVersionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -1213,52 +793,20 @@ func (a CreateRegistryWebhook) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRegistryWebhook{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRegistryWebhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRegistryWebhook) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1313,52 +861,18 @@ func (a CreateRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRun{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "start_time": o.StartTime, + "tags": o.Tags, + "user_id": o.UserId, + }) } // Type implements basetypes.ObjectValuable. @@ -1399,52 +913,15 @@ func (a CreateRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run": o.Run, + }) } // Type implements basetypes.ObjectValuable. @@ -1494,52 +971,18 @@ func (a CreateTransitionRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateTransitionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateTransitionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateTransitionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -1578,52 +1021,15 @@ func (a CreateTransitionRequestResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateTransitionRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateTransitionRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateTransitionRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "request": o.Request, + }) } // Type implements basetypes.ObjectValuable. @@ -1660,52 +1066,15 @@ func (a CreateWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateWebhookResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateWebhookResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateWebhookResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "webhook": o.Webhook, + }) } // Type implements basetypes.ObjectValuable. @@ -1759,52 +1128,20 @@ func (a Dataset) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Dataset{} - -// Equal implements basetypes.ObjectValuable. -func (o Dataset) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Dataset) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Dataset) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Dataset) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Dataset) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Dataset) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Dataset) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1849,52 +1186,16 @@ func (a DatasetInput) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DatasetInput{} - -// Equal implements basetypes.ObjectValuable. -func (o DatasetInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DatasetInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DatasetInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DatasetInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DatasetInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DatasetInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DatasetInput) 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. @@ -1933,52 +1234,15 @@ func (a DeleteCommentRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCommentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCommentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCommentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2010,52 +1274,13 @@ func (a DeleteCommentResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCommentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCommentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCommentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2087,52 +1312,15 @@ func (a DeleteExperiment) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExperiment{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExperiment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExperiment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExperiment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExperiment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExperiment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExperiment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExperiment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -2164,52 +1352,13 @@ func (a DeleteExperimentResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteExperimentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteExperimentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteExperimentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2242,52 +1391,15 @@ func (a DeleteModelRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2319,52 +1431,13 @@ func (a DeleteModelResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2400,52 +1473,16 @@ func (a DeleteModelTagRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelTagRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelTagRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2478,52 +1515,13 @@ func (a DeleteModelTagResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2558,52 +1556,16 @@ func (a DeleteModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -2636,52 +1598,13 @@ func (a DeleteModelVersionResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelVersionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2719,52 +1642,17 @@ func (a DeleteModelVersionTagRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelVersionTagRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -2798,52 +1686,13 @@ func (a DeleteModelVersionTagResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteModelVersionTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteModelVersionTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteModelVersionTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2875,52 +1724,15 @@ func (a DeleteRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRun{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteRun +// only implements ToObjectValue() and Type(). +func (o DeleteRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -2952,52 +1764,13 @@ func (a DeleteRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3036,52 +1809,17 @@ func (a DeleteRuns) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRuns{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRuns) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRuns) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRuns) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRuns) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRuns) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRuns) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRuns) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "max_runs": o.MaxRuns, + "max_timestamp_millis": o.MaxTimestampMillis, + }) } // Type implements basetypes.ObjectValuable. @@ -3117,52 +1855,15 @@ func (a DeleteRunsResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRunsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRunsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRunsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "runs_deleted": o.RunsDeleted, + }) } // Type implements basetypes.ObjectValuable. @@ -3198,52 +1899,16 @@ func (a DeleteTag) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTag{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -3276,52 +1941,13 @@ func (a DeleteTagResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3372,52 +1998,19 @@ func (a DeleteTransitionRequestRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTransitionRequestRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTransitionRequestRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "creator": o.Creator, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -3453,52 +2046,13 @@ func (a DeleteTransitionRequestResponse) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTransitionRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTransitionRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTransitionRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3531,52 +2085,15 @@ func (a DeleteWebhookRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWebhookRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWebhookRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWebhookRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3608,52 +2125,13 @@ func (a DeleteWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWebhookResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWebhookResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWebhookResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3700,52 +2178,21 @@ func (a Experiment) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Experiment{} - -// Equal implements basetypes.ObjectValuable. -func (o Experiment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Experiment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Experiment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Experiment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Experiment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Experiment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Experiment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3793,52 +2240,18 @@ func (a ExperimentAccessControlRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3885,52 +2298,19 @@ func (a ExperimentAccessControlResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3975,52 +2355,17 @@ func (a ExperimentPermission) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4058,57 +2403,22 @@ func (newState *ExperimentPermissions) SyncEffectiveFieldsDuringRead(existingSta // plugin framework type system (types.String{}, types.Bool{}, types.Int64{}, types.Float64{}) or TF // SDK values. func (a ExperimentPermissions) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{ - "access_control_list": reflect.TypeOf(ExperimentAccessControlResponse{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentPermissions) String() string { - return fmt.Sprintf("%#v", o) + return map[string]reflect.Type{ + "access_control_list": reflect.TypeOf(ExperimentAccessControlResponse{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -4147,52 +2457,16 @@ func (a ExperimentPermissionsDescription) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4230,52 +2504,16 @@ func (a ExperimentPermissionsRequest) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -4314,52 +2552,16 @@ func (a ExperimentTag) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExperimentTag{} - -// Equal implements basetypes.ObjectValuable. -func (o ExperimentTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExperimentTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExperimentTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExperimentTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExperimentTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExperimentTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExperimentTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -4398,52 +2600,17 @@ func (a FileInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o FileInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, FileInfo +// only implements ToObjectValue() and Type(). +func (o FileInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file_size": o.FileSize, + "is_dir": o.IsDir, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -4480,52 +2647,15 @@ func (a GetByNameRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetByNameRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetByNameRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetByNameRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetByNameRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetByNameRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetByNameRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetByNameRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetByNameRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_name": o.ExperimentName, + }) } // Type implements basetypes.ObjectValuable. @@ -4560,52 +2690,15 @@ func (a GetExperimentPermissionLevelsRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExperimentPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -4641,52 +2734,15 @@ func (a GetExperimentPermissionLevelsResponse) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExperimentPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -4723,52 +2779,15 @@ func (a GetExperimentPermissionsRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExperimentPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExperimentPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExperimentPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -4803,52 +2822,15 @@ func (a GetExperimentRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExperimentRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExperimentRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExperimentRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExperimentRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExperimentRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExperimentRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExperimentRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExperimentRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -4884,52 +2866,15 @@ func (a GetExperimentResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetExperimentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetExperimentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetExperimentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetExperimentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetExperimentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetExperimentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetExperimentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetExperimentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment": o.Experiment, + }) } // Type implements basetypes.ObjectValuable. @@ -4977,52 +2922,19 @@ func (a GetHistoryRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetHistoryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetHistoryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetHistoryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetHistoryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetHistoryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetHistoryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetHistoryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetHistoryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5064,52 +2976,16 @@ func (a GetLatestVersionsRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetLatestVersionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetLatestVersionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "stages": o.Stages, + }) } // Type implements basetypes.ObjectValuable. @@ -5150,52 +3026,15 @@ func (a GetLatestVersionsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetLatestVersionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetLatestVersionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetLatestVersionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_versions": o.ModelVersions, + }) } // Type implements basetypes.ObjectValuable. @@ -5236,52 +3075,16 @@ func (a GetMetricHistoryResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetMetricHistoryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetMetricHistoryResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetMetricHistoryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metrics": o.Metrics, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -5319,52 +3122,15 @@ func (a GetModelRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5399,52 +3165,15 @@ func (a GetModelResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "registered_model_databricks": o.RegisteredModelDatabricks, + }) } // Type implements basetypes.ObjectValuable. @@ -5483,52 +3212,16 @@ func (a GetModelVersionDownloadUriRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelVersionDownloadUriRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionDownloadUriRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -5563,52 +3256,15 @@ func (a GetModelVersionDownloadUriResponse) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelVersionDownloadUriResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionDownloadUriResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelVersionDownloadUriResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "artifact_uri": o.ArtifactUri, + }) } // Type implements basetypes.ObjectValuable. @@ -5637,60 +3293,24 @@ func (newState *GetModelVersionRequest) SyncEffectiveFieldsDuringRead(existingSt // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -5726,52 +3346,15 @@ func (a GetModelVersionResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetModelVersionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetModelVersionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -5808,52 +3391,15 @@ func (a GetRegisteredModelPermissionLevelsRequest) GetComplexFieldTypes(ctx cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRegisteredModelPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "registered_model_id": o.RegisteredModelId, + }) } // Type implements basetypes.ObjectValuable. @@ -5889,52 +3435,15 @@ func (a GetRegisteredModelPermissionLevelsResponse) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRegisteredModelPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -5971,52 +3480,15 @@ func (a GetRegisteredModelPermissionsRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRegisteredModelPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRegisteredModelPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRegisteredModelPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "registered_model_id": o.RegisteredModelId, + }) } // Type implements basetypes.ObjectValuable. @@ -6054,52 +3526,16 @@ func (a GetRunRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRunRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRunRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRunRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRunRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRunRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRunRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRunRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRunRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + "run_uuid": o.RunUuid, + }) } // Type implements basetypes.ObjectValuable. @@ -6137,52 +3573,15 @@ func (a GetRunResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run": o.Run, + }) } // Type implements basetypes.ObjectValuable. @@ -6235,52 +3634,18 @@ func (a HttpUrlSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = HttpUrlSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o HttpUrlSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o HttpUrlSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o HttpUrlSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o HttpUrlSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o HttpUrlSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o HttpUrlSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o HttpUrlSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "authorization": o.Authorization, + "enable_ssl_verification": o.EnableSslVerification, + "secret": o.Secret, + "url": o.Url, + }) } // Type implements basetypes.ObjectValuable. @@ -6325,52 +3690,16 @@ func (a HttpUrlSpecWithoutSecret) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = HttpUrlSpecWithoutSecret{} - -// Equal implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o HttpUrlSpecWithoutSecret) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o HttpUrlSpecWithoutSecret) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enable_ssl_verification": o.EnableSslVerification, + "url": o.Url, + }) } // Type implements basetypes.ObjectValuable. @@ -6407,52 +3736,16 @@ func (a InputTag) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = InputTag{} - -// Equal implements basetypes.ObjectValuable. -func (o InputTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o InputTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o InputTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o InputTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o InputTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o InputTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o InputTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -6493,52 +3786,17 @@ func (a JobSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o JobSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_token": o.AccessToken, + "job_id": o.JobId, + "workspace_url": o.WorkspaceUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -6578,52 +3836,16 @@ func (a JobSpecWithoutSecret) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = JobSpecWithoutSecret{} - -// Equal implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o JobSpecWithoutSecret) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o JobSpecWithoutSecret) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "job_id": o.JobId, + "workspace_url": o.WorkspaceUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -6672,52 +3894,18 @@ func (a ListArtifactsRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListArtifactsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListArtifactsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListArtifactsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_token": o.PageToken, + "path": o.Path, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + }) } // Type implements basetypes.ObjectValuable. @@ -6760,52 +3948,17 @@ func (a ListArtifactsResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListArtifactsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListArtifactsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListArtifactsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "files": o.Files, + "next_page_token": o.NextPageToken, + "root_uri": o.RootUri, + }) } // Type implements basetypes.ObjectValuable. @@ -6853,52 +4006,17 @@ func (a ListExperimentsRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExperimentsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListExperimentsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExperimentsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + "view_type": o.ViewType, + }) } // Type implements basetypes.ObjectValuable. @@ -6940,52 +4058,16 @@ func (a ListExperimentsResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListExperimentsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, ListExperimentsResponse +// only implements ToObjectValue() and Type(). +func (o ListExperimentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListExperimentsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiments": o.Experiments, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7025,52 +4107,16 @@ func (a ListModelsRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListModelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListModelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListModelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListModelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListModelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListModelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListModelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListModelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7109,52 +4155,16 @@ func (a ListModelsResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListModelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListModelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListModelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListModelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListModelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListModelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListModelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListModelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) } // Type implements basetypes.ObjectValuable. @@ -7195,52 +4205,16 @@ func (a ListRegistryWebhooks) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRegistryWebhooks{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRegistryWebhooks) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRegistryWebhooks) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "webhooks": o.Webhooks, + }) } // Type implements basetypes.ObjectValuable. @@ -7275,57 +4249,21 @@ func (newState *ListTransitionRequestsRequest) SyncEffectiveFieldsDuringRead(exi // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTransitionRequestsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) String() string { - return fmt.Sprintf("%#v", o) +// SDK values. +func (a ListTransitionRequestsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTransitionRequestsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTransitionRequestsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -7362,52 +4300,15 @@ func (a ListTransitionRequestsResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTransitionRequestsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTransitionRequestsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTransitionRequestsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "requests": o.Requests, + }) } // Type implements basetypes.ObjectValuable. @@ -7453,52 +4354,17 @@ func (a ListWebhooksRequest) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListWebhooksRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListWebhooksRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListWebhooksRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "events": o.Events, + "model_name": o.ModelName, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7549,52 +4415,18 @@ func (a LogBatch) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogBatch{} - -// Equal implements basetypes.ObjectValuable. -func (o LogBatch) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogBatch) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogBatch) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogBatch) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogBatch) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogBatch) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogBatch) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metrics": o.Metrics, + "params": o.Params, + "run_id": o.RunId, + "tags": o.Tags, + }) } // Type implements basetypes.ObjectValuable. @@ -7635,52 +4467,13 @@ func (a LogBatchResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogBatchResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o LogBatchResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogBatchResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogBatchResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogBatchResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogBatchResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogBatchResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogBatchResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7716,52 +4509,16 @@ func (a LogInputs) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogInputs{} - -// Equal implements basetypes.ObjectValuable. -func (o LogInputs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogInputs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogInputs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogInputs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogInputs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogInputs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogInputs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "datasets": o.Datasets, + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -7796,52 +4553,13 @@ func (a LogInputsResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogInputsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o LogInputsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogInputsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogInputsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogInputsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogInputsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogInputsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogInputsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -7884,52 +4602,20 @@ func (a LogMetric) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogMetric{} - -// Equal implements basetypes.ObjectValuable. -func (o LogMetric) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogMetric) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogMetric) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogMetric) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogMetric) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogMetric) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogMetric) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7966,52 +4652,13 @@ func (a LogMetricResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogMetricResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o LogMetricResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogMetricResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogMetricResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogMetricResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogMetricResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogMetricResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogMetricResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -8045,52 +4692,16 @@ func (a LogModel) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogModel{} - -// Equal implements basetypes.ObjectValuable. -func (o LogModel) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogModel) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogModel) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogModel) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogModel) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogModel) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogModel) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_json": o.ModelJson, + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -8123,52 +4734,13 @@ func (a LogModelResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o LogModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -8207,52 +4779,18 @@ func (a LogParam) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogParam{} - -// Equal implements basetypes.ObjectValuable. -func (o LogParam) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogParam) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogParam) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogParam) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogParam) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogParam) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogParam) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -8287,52 +4825,13 @@ func (a LogParamResponse) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogParamResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o LogParamResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogParamResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogParamResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogParamResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogParamResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogParamResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogParamResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -8370,52 +4869,18 @@ func (a Metric) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Metric{} - -// Equal implements basetypes.ObjectValuable. -func (o Metric) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Metric) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Metric) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Metric) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Metric) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Metric) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Metric) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "step": o.Step, + "timestamp": o.Timestamp, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -8469,52 +4934,21 @@ func (a Model) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Model{} - -// Equal implements basetypes.ObjectValuable. -func (o Model) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Model) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Model) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Model) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Model) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Model) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Model) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8578,52 +5012,23 @@ func (a ModelDatabricks) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelDatabricks{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelDatabricks) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelDatabricks) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelDatabricks) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelDatabricks) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelDatabricks) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelDatabricks) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelDatabricks) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8671,52 +5076,16 @@ func (a ModelTag) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelTag{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -8780,52 +5149,27 @@ func (a ModelVersion) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelVersion{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelVersion) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelVersion) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelVersion) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelVersion) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelVersion) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelVersion) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelVersion) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8921,52 +5265,28 @@ func (a ModelVersionDatabricks) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelVersionDatabricks{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelVersionDatabricks) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelVersionDatabricks) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9009,60 +5329,24 @@ func (newState *ModelVersionTag) SyncEffectiveFieldsDuringRead(existingState Mod // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelVersionTag{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelVersionTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelVersionTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelVersionTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelVersionTag) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelVersionTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelVersionTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelVersionTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -9099,52 +5383,16 @@ func (a Param) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Param{} - -// Equal implements basetypes.ObjectValuable. -func (o Param) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Param) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Param) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Param) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Param) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Param) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Param) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -9185,52 +5433,18 @@ func (a RegisteredModelAccessControlRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9277,52 +5491,19 @@ func (a RegisteredModelAccessControlResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9367,52 +5548,17 @@ func (a RegisteredModelPermission) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -9455,52 +5601,17 @@ func (a RegisteredModelPermissions) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -9539,52 +5650,16 @@ func (a RegisteredModelPermissionsDescription) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -9622,52 +5697,16 @@ func (a RegisteredModelPermissionsRequest) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegisteredModelPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegisteredModelPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegisteredModelPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "registered_model_id": o.RegisteredModelId, + }) } // Type implements basetypes.ObjectValuable. @@ -9763,52 +5802,23 @@ func (a RegistryWebhook) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RegistryWebhook{} - -// Equal implements basetypes.ObjectValuable. -func (o RegistryWebhook) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RegistryWebhook) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RegistryWebhook) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RegistryWebhook) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RegistryWebhook) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RegistryWebhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RegistryWebhook) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9870,52 +5880,18 @@ func (a RejectTransitionRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RejectTransitionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RejectTransitionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RejectTransitionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "stage": o.Stage, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -9954,52 +5930,15 @@ func (a RejectTransitionRequestResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RejectTransitionRequestResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RejectTransitionRequestResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RejectTransitionRequestResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "activity": o.Activity, + }) } // Type implements basetypes.ObjectValuable. @@ -10037,52 +5976,16 @@ func (a RenameModelRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RenameModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RenameModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RenameModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RenameModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RenameModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RenameModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RenameModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RenameModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "new_name": o.NewName, + }) } // Type implements basetypes.ObjectValuable. @@ -10118,52 +6021,15 @@ func (a RenameModelResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RenameModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RenameModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RenameModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RenameModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RenameModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RenameModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RenameModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RenameModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "registered_model": o.RegisteredModel, + }) } // Type implements basetypes.ObjectValuable. @@ -10199,52 +6065,15 @@ func (a RestoreExperiment) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreExperiment{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreExperiment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreExperiment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreExperiment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreExperiment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreExperiment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreExperiment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreExperiment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + }) } // Type implements basetypes.ObjectValuable. @@ -10276,52 +6105,13 @@ func (a RestoreExperimentResponse) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreExperimentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreExperimentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreExperimentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10353,52 +6143,15 @@ func (a RestoreRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreRun{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_id": o.RunId, + }) } // Type implements basetypes.ObjectValuable. @@ -10430,52 +6183,13 @@ func (a RestoreRunResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10514,52 +6228,17 @@ func (a RestoreRuns) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreRuns{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreRuns) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreRuns) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreRuns) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreRuns) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreRuns) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreRuns) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreRuns) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "max_runs": o.MaxRuns, + "min_timestamp_millis": o.MinTimestampMillis, + }) } // Type implements basetypes.ObjectValuable. @@ -10595,52 +6274,15 @@ func (a RestoreRunsResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreRunsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreRunsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreRunsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "runs_restored": o.RunsRestored, + }) } // Type implements basetypes.ObjectValuable. @@ -10677,57 +6319,22 @@ func (newState *Run) SyncEffectiveFieldsDuringRead(existingState Run) { func (a Run) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ "data": reflect.TypeOf(RunData{}), - "info": reflect.TypeOf(RunInfo{}), - "inputs": reflect.TypeOf(RunInputs{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Run{} - -// Equal implements basetypes.ObjectValuable. -func (o Run) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Run) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Run) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Run) String() string { - return fmt.Sprintf("%#v", o) + "info": reflect.TypeOf(RunInfo{}), + "inputs": reflect.TypeOf(RunInputs{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o Run) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Run) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Run) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data": o.Data, + "info": o.Info, + "inputs": o.Inputs, + }) } // Type implements basetypes.ObjectValuable. @@ -10777,52 +6384,17 @@ func (a RunData) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunData{} - -// Equal implements basetypes.ObjectValuable. -func (o RunData) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunData) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunData) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunData) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunData) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunData) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunData) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "metrics": o.Metrics, + "params": o.Params, + "tags": o.Tags, + }) } // Type implements basetypes.ObjectValuable. @@ -10886,52 +6458,23 @@ func (a RunInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RunInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10975,52 +6518,15 @@ func (a RunInputs) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunInputs{} - -// Equal implements basetypes.ObjectValuable. -func (o RunInputs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunInputs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunInputs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunInputs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunInputs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunInputs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunInputs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dataset_inputs": o.DatasetInputs, + }) } // Type implements basetypes.ObjectValuable. @@ -11058,52 +6564,16 @@ func (a RunTag) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RunTag{} - -// Equal implements basetypes.ObjectValuable. -func (o RunTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RunTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RunTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RunTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RunTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RunTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RunTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -11153,52 +6623,19 @@ func (a SearchExperiments) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchExperiments{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchExperiments) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchExperiments) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchExperiments) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchExperiments) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchExperiments) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchExperiments) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchExperiments) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11243,52 +6680,16 @@ func (a SearchExperimentsResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchExperimentsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchExperimentsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchExperimentsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiments": o.Experiments, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11338,52 +6739,18 @@ func (a SearchModelVersionsRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchModelVersionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchModelVersionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchModelVersionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11427,52 +6794,16 @@ func (a SearchModelVersionsResponse) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchModelVersionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchModelVersionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchModelVersionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_versions": o.ModelVersions, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11522,52 +6853,18 @@ func (a SearchModelsRequest) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchModelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchModelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchModelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchModelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchModelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchModelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchModelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchModelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -11610,52 +6907,16 @@ func (a SearchModelsResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchModelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchModelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchModelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchModelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchModelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchModelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchModelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchModelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "registered_models": o.RegisteredModels, + }) } // Type implements basetypes.ObjectValuable. @@ -11722,52 +6983,20 @@ func (a SearchRuns) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchRuns{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchRuns) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchRuns) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchRuns) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchRuns) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchRuns) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchRuns) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchRuns) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11814,52 +7043,16 @@ func (a SearchRunsResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SearchRunsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SearchRunsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SearchRunsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SearchRunsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SearchRunsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SearchRunsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SearchRunsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SearchRunsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "runs": o.Runs, + }) } // Type implements basetypes.ObjectValuable. @@ -11903,52 +7096,17 @@ func (a SetExperimentTag) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetExperimentTag{} - -// Equal implements basetypes.ObjectValuable. -func (o SetExperimentTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetExperimentTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetExperimentTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetExperimentTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetExperimentTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetExperimentTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetExperimentTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -11982,52 +7140,13 @@ func (a SetExperimentTagResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetExperimentTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetExperimentTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetExperimentTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12068,52 +7187,17 @@ func (a SetModelTagRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetModelTagRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SetModelTagRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetModelTagRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetModelTagRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetModelTagRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetModelTagRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetModelTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetModelTagRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -12147,52 +7231,13 @@ func (a SetModelTagResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetModelTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetModelTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetModelTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetModelTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetModelTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetModelTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetModelTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetModelTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12235,52 +7280,18 @@ func (a SetModelVersionTagRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetModelVersionTagRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetModelVersionTagRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetModelVersionTagRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "name": o.Name, + "value": o.Value, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -12315,52 +7326,13 @@ func (a SetModelVersionTagResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetModelVersionTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetModelVersionTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetModelVersionTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12394,60 +7366,26 @@ func (newState *SetTag) SyncEffectiveFieldsDuringRead(existingState SetTag) { // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetTag{} - -// Equal implements basetypes.ObjectValuable. -func (o SetTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetTag) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -12482,52 +7420,13 @@ func (a SetTagResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetTagResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetTagResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetTagResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetTagResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetTagResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetTagResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetTagResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetTagResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12562,52 +7461,16 @@ func (a TestRegistryWebhook) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TestRegistryWebhook{} - -// Equal implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, TestRegistryWebhook +// only implements ToObjectValue() and Type(). +func (o TestRegistryWebhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhook) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "body": o.Body, + "status_code": o.StatusCode, + }) } // Type implements basetypes.ObjectValuable. @@ -12646,52 +7509,16 @@ func (a TestRegistryWebhookRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TestRegistryWebhookRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TestRegistryWebhookRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhookRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "event": o.Event, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -12728,52 +7555,15 @@ func (a TestRegistryWebhookResponse) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TestRegistryWebhookResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TestRegistryWebhookResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TestRegistryWebhookResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "webhook": o.Webhook, + }) } // Type implements basetypes.ObjectValuable. @@ -12826,52 +7616,19 @@ func (a TransitionModelVersionStageDatabricks) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TransitionModelVersionStageDatabricks{} - -// Equal implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TransitionModelVersionStageDatabricks) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TransitionModelVersionStageDatabricks) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12929,52 +7686,19 @@ func (a TransitionRequest) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TransitionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TransitionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TransitionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TransitionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TransitionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TransitionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TransitionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TransitionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13015,52 +7739,15 @@ func (a TransitionStageResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TransitionStageResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o TransitionStageResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TransitionStageResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TransitionStageResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TransitionStageResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TransitionStageResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TransitionStageResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TransitionStageResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_version": o.ModelVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -13098,52 +7785,16 @@ func (a UpdateComment) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateComment{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateComment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateComment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateComment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateComment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateComment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateComment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateComment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -13180,52 +7831,15 @@ func (a UpdateCommentResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCommentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCommentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCommentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + }) } // Type implements basetypes.ObjectValuable. @@ -13264,52 +7878,16 @@ func (a UpdateExperiment) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExperiment{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExperiment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExperiment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExperiment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExperiment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExperiment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExperiment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExperiment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "experiment_id": o.ExperimentId, + "new_name": o.NewName, + }) } // Type implements basetypes.ObjectValuable. @@ -13342,52 +7920,13 @@ func (a UpdateExperimentResponse) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateExperimentResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateExperimentResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateExperimentResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -13421,52 +7960,16 @@ func (a UpdateModelRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateModelRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateModelRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateModelRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateModelRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateModelRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateModelRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateModelRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateModelRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -13499,52 +8002,13 @@ func (a UpdateModelResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateModelResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateModelResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateModelResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateModelResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateModelResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateModelResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateModelResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateModelResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -13580,52 +8044,17 @@ func (a UpdateModelVersionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateModelVersionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "version": o.Version, + }) } // Type implements basetypes.ObjectValuable. @@ -13659,52 +8088,13 @@ func (a UpdateModelVersionResponse) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateModelVersionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateModelVersionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateModelVersionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -13789,52 +8179,20 @@ func (a UpdateRegistryWebhook) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRegistryWebhook{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRegistryWebhook) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRegistryWebhook) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13886,52 +8244,18 @@ func (a UpdateRun) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRun{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRun) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRun) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRun) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRun) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRun) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRun) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRun) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "end_time": o.EndTime, + "run_id": o.RunId, + "run_uuid": o.RunUuid, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -13970,52 +8294,15 @@ func (a UpdateRunResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRunResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRunResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRunResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRunResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRunResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRunResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRunResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRunResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_info": o.RunInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -14049,52 +8336,13 @@ func (a UpdateWebhookResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateWebhookResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateWebhookResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateWebhookResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/oauth2_tf/model.go b/internal/service/oauth2_tf/model.go index 71d3187be..975ac569c 100755 --- a/internal/service/oauth2_tf/model.go +++ b/internal/service/oauth2_tf/model.go @@ -12,15 +12,11 @@ package oauth2_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type CreateCustomAppIntegration struct { @@ -59,52 +55,19 @@ func (a CreateCustomAppIntegration) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCustomAppIntegration{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCustomAppIntegration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -153,52 +116,17 @@ func (a CreateCustomAppIntegrationOutput) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCustomAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCustomAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "client_id": o.ClientId, + "client_secret": o.ClientSecret, + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -239,52 +167,16 @@ func (a CreatePublishedAppIntegration) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePublishedAppIntegration{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePublishedAppIntegration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "app_id": o.AppId, + "token_access_policy": o.TokenAccessPolicy, + }) } // Type implements basetypes.ObjectValuable. @@ -321,52 +213,15 @@ func (a CreatePublishedAppIntegrationOutput) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePublishedAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePublishedAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -401,52 +256,15 @@ func (a CreateServicePrincipalSecretRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateServicePrincipalSecretRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateServicePrincipalSecretRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "service_principal_id": o.ServicePrincipalId, + }) } // Type implements basetypes.ObjectValuable. @@ -490,52 +308,20 @@ func (a CreateServicePrincipalSecretResponse) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateServicePrincipalSecretResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateServicePrincipalSecretResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateServicePrincipalSecretResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -576,52 +362,16 @@ func (a DataPlaneInfo) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataPlaneInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o DataPlaneInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataPlaneInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataPlaneInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataPlaneInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataPlaneInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataPlaneInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataPlaneInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "authorization_details": o.AuthorizationDetails, + "endpoint_url": o.EndpointUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -654,52 +404,13 @@ func (a DeleteCustomAppIntegrationOutput) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCustomAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -731,52 +442,15 @@ func (a DeleteCustomAppIntegrationRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCustomAppIntegrationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCustomAppIntegrationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCustomAppIntegrationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -808,52 +482,13 @@ func (a DeletePublishedAppIntegrationOutput) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePublishedAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -885,52 +520,15 @@ func (a DeletePublishedAppIntegrationRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePublishedAppIntegrationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePublishedAppIntegrationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePublishedAppIntegrationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -962,52 +560,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1042,52 +601,16 @@ func (a DeleteServicePrincipalSecretRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteServicePrincipalSecretRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteServicePrincipalSecretRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteServicePrincipalSecretRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "secret_id": o.SecretId, + "service_principal_id": o.ServicePrincipalId, + }) } // Type implements basetypes.ObjectValuable. @@ -1145,52 +668,24 @@ func (a GetCustomAppIntegrationOutput) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCustomAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1240,52 +735,15 @@ func (a GetCustomAppIntegrationRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCustomAppIntegrationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -1323,52 +781,16 @@ func (a GetCustomAppIntegrationsOutput) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCustomAppIntegrationsOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCustomAppIntegrationsOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCustomAppIntegrationsOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1417,52 +839,20 @@ func (a GetPublishedAppIntegrationOutput) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPublishedAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1503,52 +893,15 @@ func (a GetPublishedAppIntegrationRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPublishedAppIntegrationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + }) } // Type implements basetypes.ObjectValuable. @@ -1586,52 +939,16 @@ func (a GetPublishedAppIntegrationsOutput) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPublishedAppIntegrationsOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppIntegrationsOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPublishedAppIntegrationsOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1673,52 +990,16 @@ func (a GetPublishedAppsOutput) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPublishedAppsOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPublishedAppsOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPublishedAppsOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "apps": o.Apps, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1759,52 +1040,17 @@ func (a ListCustomAppIntegrationsRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCustomAppIntegrationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListCustomAppIntegrationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCustomAppIntegrationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_creator_username": o.IncludeCreatorUsername, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1843,52 +1089,16 @@ func (a ListOAuthPublishedAppsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListOAuthPublishedAppsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListOAuthPublishedAppsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListOAuthPublishedAppsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1925,52 +1135,16 @@ func (a ListPublishedAppIntegrationsRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPublishedAppIntegrationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPublishedAppIntegrationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPublishedAppIntegrationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2016,52 +1190,16 @@ func (a ListServicePrincipalSecretsRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListServicePrincipalSecretsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalSecretsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_token": o.PageToken, + "service_principal_id": o.ServicePrincipalId, + }) } // Type implements basetypes.ObjectValuable. @@ -2100,52 +1238,16 @@ func (a ListServicePrincipalSecretsResponse) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListServicePrincipalSecretsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListServicePrincipalSecretsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListServicePrincipalSecretsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "secrets": o.Secrets, + }) } // Type implements basetypes.ObjectValuable. @@ -2199,52 +1301,21 @@ func (a PublishedAppOutput) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PublishedAppOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o PublishedAppOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PublishedAppOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PublishedAppOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PublishedAppOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PublishedAppOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PublishedAppOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PublishedAppOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2296,52 +1367,19 @@ func (a SecretInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SecretInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o SecretInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SecretInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SecretInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SecretInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SecretInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SecretInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SecretInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2381,52 +1419,16 @@ func (a TokenAccessPolicy) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenAccessPolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenAccessPolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenAccessPolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_token_ttl_in_minutes": o.AccessTokenTtlInMinutes, + "refresh_token_ttl_in_minutes": o.RefreshTokenTtlInMinutes, + }) } // Type implements basetypes.ObjectValuable. @@ -2468,52 +1470,17 @@ func (a UpdateCustomAppIntegration) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCustomAppIntegration{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCustomAppIntegration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + "redirect_urls": o.RedirectUrls, + "token_access_policy": o.TokenAccessPolicy, + }) } // Type implements basetypes.ObjectValuable. @@ -2551,52 +1518,13 @@ func (a UpdateCustomAppIntegrationOutput) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCustomAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCustomAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCustomAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2631,52 +1559,16 @@ func (a UpdatePublishedAppIntegration) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePublishedAppIntegration{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePublishedAppIntegration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_id": o.IntegrationId, + "token_access_policy": o.TokenAccessPolicy, + }) } // Type implements basetypes.ObjectValuable. @@ -2711,52 +1603,13 @@ func (a UpdatePublishedAppIntegrationOutput) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePublishedAppIntegrationOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePublishedAppIntegrationOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePublishedAppIntegrationOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/pipelines_tf/model.go b/internal/service/pipelines_tf/model.go index 4568058cc..e3a822883 100755 --- a/internal/service/pipelines_tf/model.go +++ b/internal/service/pipelines_tf/model.go @@ -12,17 +12,13 @@ package pipelines_tf import ( "context" - "fmt" "reflect" "github.com/databricks/databricks-sdk-go/service/compute" - 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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type CreatePipeline struct { @@ -116,52 +112,39 @@ func (a CreatePipeline) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePipeline{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePipeline) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePipeline) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePipeline) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePipeline) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePipeline) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePipeline) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePipeline) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -244,52 +227,16 @@ func (a CreatePipelineResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePipelineResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePipelineResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePipelineResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "effective_settings": o.EffectiveSettings, + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -327,52 +274,16 @@ func (a CronTrigger) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CronTrigger{} - -// Equal implements basetypes.ObjectValuable. -func (o CronTrigger) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CronTrigger) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CronTrigger) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CronTrigger) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CronTrigger) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CronTrigger) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CronTrigger) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "quartz_cron_schedule": o.QuartzCronSchedule, + "timezone_id": o.TimezoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -409,52 +320,16 @@ func (a DataPlaneId) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataPlaneId{} - -// Equal implements basetypes.ObjectValuable. -func (o DataPlaneId) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataPlaneId) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataPlaneId) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataPlaneId) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataPlaneId) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataPlaneId) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataPlaneId) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "instance": o.Instance, + "seq_no": o.SeqNo, + }) } // Type implements basetypes.ObjectValuable. @@ -489,52 +364,15 @@ func (a DeletePipelineRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePipelineRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePipelineRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePipelineRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -566,52 +404,13 @@ func (a DeletePipelineResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePipelineResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePipelineResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePipelineResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -716,52 +515,40 @@ func (a EditPipeline) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditPipeline{} - -// Equal implements basetypes.ObjectValuable. -func (o EditPipeline) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditPipeline) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditPipeline) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditPipeline) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditPipeline) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditPipeline) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditPipeline) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -838,52 +625,13 @@ func (a EditPipelineResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditPipelineResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditPipelineResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditPipelineResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditPipelineResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditPipelineResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditPipelineResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditPipelineResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditPipelineResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -919,52 +667,16 @@ func (a ErrorDetail) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ErrorDetail{} - -// Equal implements basetypes.ObjectValuable. -func (o ErrorDetail) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ErrorDetail) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ErrorDetail) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ErrorDetail) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ErrorDetail) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ErrorDetail) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ErrorDetail) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exceptions": o.Exceptions, + "fatal": o.Fatal, + }) } // Type implements basetypes.ObjectValuable. @@ -1001,52 +713,15 @@ func (a FileLibrary) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FileLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o FileLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FileLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FileLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FileLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FileLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FileLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FileLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -1085,52 +760,16 @@ func (a Filters) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Filters{} - -// Equal implements basetypes.ObjectValuable. -func (o Filters) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Filters) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Filters) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Filters) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Filters) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Filters) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Filters) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "exclude": o.Exclude, + "include": o.Include, + }) } // Type implements basetypes.ObjectValuable. @@ -1170,52 +809,15 @@ func (a GetPipelinePermissionLevelsRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPipelinePermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -1251,52 +853,15 @@ func (a GetPipelinePermissionLevelsResponse) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPipelinePermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -1333,52 +898,15 @@ func (a GetPipelinePermissionsRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPipelinePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPipelinePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPipelinePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -1412,52 +940,15 @@ func (a GetPipelineRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPipelineRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPipelineRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPipelineRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPipelineRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPipelineRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPipelineRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPipelineRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPipelineRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -1518,52 +1009,26 @@ func (a GetPipelineResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPipelineResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPipelineResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPipelineResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPipelineResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPipelineResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPipelineResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPipelineResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPipelineResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1615,52 +1080,16 @@ func (a GetUpdateRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetUpdateRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetUpdateRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetUpdateRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetUpdateRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetUpdateRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetUpdateRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetUpdateRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetUpdateRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + "update_id": o.UpdateId, + }) } // Type implements basetypes.ObjectValuable. @@ -1697,52 +1126,15 @@ func (a GetUpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetUpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetUpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetUpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetUpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetUpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetUpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetUpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetUpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "update": o.Update, + }) } // Type implements basetypes.ObjectValuable. @@ -1786,52 +1178,17 @@ func (a IngestionConfig) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = IngestionConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o IngestionConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o IngestionConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o IngestionConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o IngestionConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o IngestionConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o IngestionConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o IngestionConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "report": o.Report, + "schema": o.Schema, + "table": o.Table, + }) } // Type implements basetypes.ObjectValuable. @@ -1889,52 +1246,19 @@ func (a IngestionGatewayPipelineDefinition) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = IngestionGatewayPipelineDefinition{} - -// Equal implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o IngestionGatewayPipelineDefinition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o IngestionGatewayPipelineDefinition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1987,52 +1311,18 @@ func (a IngestionPipelineDefinition) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = IngestionPipelineDefinition{} - -// Equal implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o IngestionPipelineDefinition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o IngestionPipelineDefinition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "connection_name": o.ConnectionName, + "ingestion_gateway_id": o.IngestionGatewayId, + "objects": o.Objects, + "table_configuration": o.TableConfiguration, + }) } // Type implements basetypes.ObjectValuable. @@ -2097,52 +1387,19 @@ func (a ListPipelineEventsRequest) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPipelineEventsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPipelineEventsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPipelineEventsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2188,52 +1445,17 @@ func (a ListPipelineEventsResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPipelineEventsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPipelineEventsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPipelineEventsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "events": o.Events, + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2293,52 +1515,18 @@ func (a ListPipelinesRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPipelinesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPipelinesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPipelinesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter": o.Filter, + "max_results": o.MaxResults, + "order_by": o.OrderBy, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2381,52 +1569,16 @@ func (a ListPipelinesResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPipelinesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPipelinesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPipelinesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "statuses": o.Statuses, + }) } // Type implements basetypes.ObjectValuable. @@ -2470,52 +1622,18 @@ func (a ListUpdatesRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListUpdatesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListUpdatesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListUpdatesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2560,52 +1678,17 @@ func (a ListUpdatesResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListUpdatesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListUpdatesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListUpdatesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "prev_page_token": o.PrevPageToken, + "updates": o.Updates, + }) } // Type implements basetypes.ObjectValuable. @@ -2641,52 +1724,13 @@ func (a ManualTrigger) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ManualTrigger{} - -// Equal implements basetypes.ObjectValuable. -func (o ManualTrigger) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ManualTrigger) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ManualTrigger) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ManualTrigger) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ManualTrigger) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ManualTrigger) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ManualTrigger) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2718,52 +1762,15 @@ func (a NotebookLibrary) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NotebookLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o NotebookLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NotebookLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NotebookLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NotebookLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NotebookLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NotebookLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NotebookLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -2808,52 +1815,16 @@ func (a Notifications) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Notifications{} - -// Equal implements basetypes.ObjectValuable. -func (o Notifications) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Notifications) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Notifications) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Notifications) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Notifications) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Notifications) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Notifications) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alerts": o.Alerts, + "email_recipients": o.EmailRecipients, + }) } // Type implements basetypes.ObjectValuable. @@ -2925,52 +1896,31 @@ func (a Origin) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Origin{} - -// Equal implements basetypes.ObjectValuable. -func (o Origin) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Origin) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Origin) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Origin) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Origin) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Origin) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Origin) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3026,52 +1976,18 @@ func (a PipelineAccessControlRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3118,52 +2034,19 @@ func (a PipelineAccessControlResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3191,17 +2074,17 @@ type PipelineCluster struct { 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 compute.AwsAttributes `tfsdk:"aws_attributes" tf:"optional,object"` + 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 compute.AzureAttributes `tfsdk:"azure_attributes" tf:"optional,object"` + 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 compute.ClusterLogConf `tfsdk:"cluster_log_conf" tf:"optional,object"` + 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: @@ -3223,7 +2106,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 compute.GcpAttributes `tfsdk:"gcp_attributes" tf:"optional,object"` + 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 @@ -3306,52 +2189,33 @@ func (a PipelineCluster) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineCluster{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineCluster) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineCluster) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineCluster) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineCluster) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineCluster) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineCluster) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineCluster) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3434,52 +2298,17 @@ func (a PipelineClusterAutoscale) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineClusterAutoscale{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineClusterAutoscale) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineClusterAutoscale) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_workers": o.MaxWorkers, + "min_workers": o.MinWorkers, + "mode": o.Mode, + }) } // Type implements basetypes.ObjectValuable. @@ -3517,52 +2346,16 @@ func (a PipelineDeployment) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineDeployment{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineDeployment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineDeployment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineDeployment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineDeployment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineDeployment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineDeployment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineDeployment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "kind": o.Kind, + "metadata_file_path": o.MetadataFilePath, + }) } // Type implements basetypes.ObjectValuable. @@ -3617,52 +2410,23 @@ func (a PipelineEvent) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineEvent{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineEvent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineEvent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineEvent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineEvent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineEvent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineEvent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineEvent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3695,7 +2459,7 @@ type PipelineLibrary struct { // 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 compute.MavenLibrary `tfsdk:"maven" tf:"optional,object"` + 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"` @@ -3724,52 +2488,19 @@ func (a PipelineLibrary) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineLibrary{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineLibrary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineLibrary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineLibrary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineLibrary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineLibrary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineLibrary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineLibrary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "file": o.File, + "jar": o.Jar, + "maven": o.Maven, + "notebook": o.Notebook, + "whl": o.Whl, + }) } // Type implements basetypes.ObjectValuable. @@ -3818,52 +2549,17 @@ func (a PipelinePermission) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelinePermission{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelinePermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelinePermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelinePermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelinePermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelinePermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelinePermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelinePermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -3906,52 +2602,17 @@ func (a PipelinePermissions) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelinePermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelinePermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelinePermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelinePermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelinePermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelinePermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelinePermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -3990,52 +2651,16 @@ func (a PipelinePermissionsDescription) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelinePermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelinePermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -4073,52 +2698,16 @@ func (a PipelinePermissionsRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelinePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelinePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelinePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -4219,52 +2808,37 @@ func (a PipelineSpec) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4358,52 +2932,22 @@ func (a PipelineStateInfo) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineStateInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineStateInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineStateInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineStateInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineStateInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineStateInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineStateInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineStateInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4450,52 +2994,16 @@ func (a PipelineTrigger) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PipelineTrigger{} - -// Equal implements basetypes.ObjectValuable. -func (o PipelineTrigger) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PipelineTrigger) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PipelineTrigger) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PipelineTrigger) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PipelineTrigger) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PipelineTrigger) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PipelineTrigger) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cron": o.Cron, + "manual": o.Manual, + }) } // Type implements basetypes.ObjectValuable. @@ -4547,52 +3055,19 @@ func (a ReportSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReportSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o ReportSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReportSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReportSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReportSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReportSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReportSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReportSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4642,52 +3117,17 @@ func (a RestartWindow) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestartWindow{} - -// Equal implements basetypes.ObjectValuable. -func (o RestartWindow) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestartWindow) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestartWindow) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestartWindow) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestartWindow) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestartWindow) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestartWindow) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "days_of_week": o.DaysOfWeek, + "start_hour": o.StartHour, + "time_zone_id": o.TimeZoneId, + }) } // Type implements basetypes.ObjectValuable. @@ -4738,52 +3178,19 @@ func (a SchemaSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SchemaSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o SchemaSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SchemaSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SchemaSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SchemaSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SchemaSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SchemaSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SchemaSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4827,52 +3234,16 @@ func (a Sequencing) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Sequencing{} - -// Equal implements basetypes.ObjectValuable. -func (o Sequencing) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Sequencing) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Sequencing) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Sequencing) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Sequencing) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Sequencing) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Sequencing) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "control_plane_seq_no": o.ControlPlaneSeqNo, + "data_plane_id": o.DataPlaneId, + }) } // Type implements basetypes.ObjectValuable. @@ -4915,52 +3286,17 @@ func (a SerializedException) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SerializedException{} - -// Equal implements basetypes.ObjectValuable. -func (o SerializedException) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SerializedException) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SerializedException) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SerializedException) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SerializedException) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SerializedException) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SerializedException) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "class_name": o.ClassName, + "message": o.Message, + "stack": o.Stack, + }) } // Type implements basetypes.ObjectValuable. @@ -5004,52 +3340,18 @@ func (a StackFrame) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StackFrame{} - -// Equal implements basetypes.ObjectValuable. -func (o StackFrame) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StackFrame) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StackFrame) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StackFrame) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StackFrame) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StackFrame) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StackFrame) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "declaring_class": o.DeclaringClass, + "file_name": o.FileName, + "line_number": o.LineNumber, + "method_name": o.MethodName, + }) } // Type implements basetypes.ObjectValuable. @@ -5105,52 +3407,20 @@ func (a StartUpdate) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartUpdate{} - -// Equal implements basetypes.ObjectValuable. -func (o StartUpdate) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartUpdate) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartUpdate) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartUpdate) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartUpdate) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartUpdate) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartUpdate) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5192,52 +3462,15 @@ func (a StartUpdateResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartUpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StartUpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartUpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartUpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartUpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartUpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartUpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartUpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "update_id": o.UpdateId, + }) } // Type implements basetypes.ObjectValuable. @@ -5269,52 +3502,13 @@ func (a StopPipelineResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StopPipelineResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StopPipelineResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StopPipelineResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StopPipelineResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StopPipelineResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StopPipelineResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StopPipelineResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StopPipelineResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5346,52 +3540,15 @@ func (a StopRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StopRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o StopRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StopRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StopRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StopRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StopRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StopRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StopRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "pipeline_id": o.PipelineId, + }) } // Type implements basetypes.ObjectValuable. @@ -5443,52 +3600,21 @@ func (a TableSpec) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o TableSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5542,52 +3668,18 @@ func (a TableSpecificConfig) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TableSpecificConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o TableSpecificConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TableSpecificConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TableSpecificConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TableSpecificConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TableSpecificConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TableSpecificConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TableSpecificConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5660,52 +3752,25 @@ func (a UpdateInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5758,52 +3823,17 @@ func (a UpdateStateInfo) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateStateInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateStateInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateStateInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateStateInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateStateInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateStateInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateStateInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateStateInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "creation_time": o.CreationTime, + "state": o.State, + "update_id": o.UpdateId, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/provisioning_tf/model.go b/internal/service/provisioning_tf/model.go index 9e1442d59..2b91c6f3e 100755 --- a/internal/service/provisioning_tf/model.go +++ b/internal/service/provisioning_tf/model.go @@ -12,15 +12,11 @@ package provisioning_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AwsCredentials struct { @@ -46,52 +42,15 @@ func (a AwsCredentials) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsCredentials{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsCredentials) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsCredentials) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsCredentials) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsCredentials) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsCredentials) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsCredentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsCredentials) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "sts_role": o.StsRole, + }) } // Type implements basetypes.ObjectValuable. @@ -136,52 +95,18 @@ func (a AwsKeyInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AwsKeyInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o AwsKeyInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AwsKeyInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AwsKeyInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AwsKeyInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AwsKeyInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AwsKeyInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AwsKeyInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -220,52 +145,16 @@ func (a AzureWorkspaceInfo) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureWorkspaceInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureWorkspaceInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureWorkspaceInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "resource_group": o.ResourceGroup, + "subscription_id": o.SubscriptionId, + }) } // Type implements basetypes.ObjectValuable. @@ -303,52 +192,15 @@ func (a CloudResourceContainer) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CloudResourceContainer{} - -// Equal implements basetypes.ObjectValuable. -func (o CloudResourceContainer) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CloudResourceContainer) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CloudResourceContainer) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CloudResourceContainer) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CloudResourceContainer) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CloudResourceContainer) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CloudResourceContainer) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "gcp": o.Gcp, + }) } // Type implements basetypes.ObjectValuable. @@ -392,52 +244,17 @@ func (a CreateAwsKeyInfo) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAwsKeyInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAwsKeyInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAwsKeyInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key_alias": o.KeyAlias, + "key_arn": o.KeyArn, + "reuse_key_for_cluster_volumes": o.ReuseKeyForClusterVolumes, + }) } // Type implements basetypes.ObjectValuable. @@ -474,52 +291,15 @@ func (a CreateCredentialAwsCredentials) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialAwsCredentials{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialAwsCredentials) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialAwsCredentials) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "sts_role": o.StsRole, + }) } // Type implements basetypes.ObjectValuable. @@ -558,52 +338,16 @@ func (a CreateCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_credentials": o.AwsCredentials, + "credentials_name": o.CredentialsName, + }) } // Type implements basetypes.ObjectValuable. @@ -640,52 +384,15 @@ func (a CreateCredentialStsRole) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialStsRole{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialStsRole) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialStsRole) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "role_arn": o.RoleArn, + }) } // Type implements basetypes.ObjectValuable. @@ -726,52 +433,17 @@ func (a CreateCustomerManagedKeyRequest) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCustomerManagedKeyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCustomerManagedKeyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCustomerManagedKeyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_key_info": o.AwsKeyInfo, + "gcp_key_info": o.GcpKeyInfo, + "use_cases": o.UseCases, + }) } // Type implements basetypes.ObjectValuable. @@ -813,52 +485,15 @@ func (a CreateGcpKeyInfo) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateGcpKeyInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateGcpKeyInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateGcpKeyInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "kms_key_id": o.KmsKeyId, + }) } // Type implements basetypes.ObjectValuable. @@ -914,52 +549,20 @@ func (a CreateNetworkRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateNetworkRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateNetworkRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateNetworkRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1010,52 +613,16 @@ func (a CreateStorageConfigurationRequest) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateStorageConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateStorageConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateStorageConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "root_bucket_info": o.RootBucketInfo, + "storage_configuration_name": o.StorageConfigurationName, + }) } // Type implements basetypes.ObjectValuable. @@ -1101,52 +668,18 @@ func (a CreateVpcEndpointRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVpcEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVpcEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVpcEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1298,52 +831,31 @@ func (a CreateWorkspaceRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateWorkspaceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateWorkspaceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1411,52 +923,19 @@ func (a Credential) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Credential{} - -// Equal implements basetypes.ObjectValuable. -func (o Credential) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Credential) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Credential) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Credential) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Credential) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Credential) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Credential) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1498,52 +977,15 @@ func (a CustomerFacingGcpCloudResourceContainer) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CustomerFacingGcpCloudResourceContainer{} - -// Equal implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CustomerFacingGcpCloudResourceContainer) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CustomerFacingGcpCloudResourceContainer) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "project_id": o.ProjectId, + }) } // Type implements basetypes.ObjectValuable. @@ -1591,52 +1033,20 @@ func (a CustomerManagedKey) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CustomerManagedKey{} - -// Equal implements basetypes.ObjectValuable. -func (o CustomerManagedKey) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CustomerManagedKey) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CustomerManagedKey) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CustomerManagedKey) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CustomerManagedKey) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CustomerManagedKey) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CustomerManagedKey) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1682,52 +1092,15 @@ func (a DeleteCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + }) } // Type implements basetypes.ObjectValuable. @@ -1762,52 +1135,15 @@ func (a DeleteEncryptionKeyRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteEncryptionKeyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteEncryptionKeyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteEncryptionKeyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "customer_managed_key_id": o.CustomerManagedKeyId, + }) } // Type implements basetypes.ObjectValuable. @@ -1842,52 +1178,15 @@ func (a DeleteNetworkRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteNetworkRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteNetworkRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteNetworkRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_id": o.NetworkId, + }) } // Type implements basetypes.ObjectValuable. @@ -1922,52 +1221,15 @@ func (a DeletePrivateAccesRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePrivateAccesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePrivateAccesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePrivateAccesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "private_access_settings_id": o.PrivateAccessSettingsId, + }) } // Type implements basetypes.ObjectValuable. @@ -1999,52 +1261,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -2077,52 +1300,15 @@ func (a DeleteStorageRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteStorageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteStorageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteStorageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "storage_configuration_id": o.StorageConfigurationId, + }) } // Type implements basetypes.ObjectValuable. @@ -2157,52 +1343,15 @@ func (a DeleteVpcEndpointRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteVpcEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteVpcEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteVpcEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "vpc_endpoint_id": o.VpcEndpointId, + }) } // Type implements basetypes.ObjectValuable. @@ -2237,52 +1386,15 @@ func (a DeleteWorkspaceRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWorkspaceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWorkspaceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -2320,52 +1432,17 @@ func (a ExternalCustomerInfo) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExternalCustomerInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExternalCustomerInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExternalCustomerInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "authoritative_user_email": o.AuthoritativeUserEmail, + "authoritative_user_full_name": o.AuthoritativeUserFullName, + "customer_name": o.CustomerName, + }) } // Type implements basetypes.ObjectValuable. @@ -2401,52 +1478,15 @@ func (a GcpKeyInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpKeyInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpKeyInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpKeyInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpKeyInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpKeyInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpKeyInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpKeyInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpKeyInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "kms_key_id": o.KmsKeyId, + }) } // Type implements basetypes.ObjectValuable. @@ -2510,52 +1550,17 @@ func (a GcpManagedNetworkConfig) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpManagedNetworkConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpManagedNetworkConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpManagedNetworkConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2609,52 +1614,20 @@ func (a GcpNetworkInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpNetworkInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpNetworkInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpNetworkInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2704,52 +1677,19 @@ func (a GcpVpcEndpointInfo) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GcpVpcEndpointInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GcpVpcEndpointInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GcpVpcEndpointInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2788,52 +1728,15 @@ func (a GetCredentialRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCredentialRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCredentialRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCredentialRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCredentialRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCredentialRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCredentialRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCredentialRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCredentialRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credentials_id": o.CredentialsId, + }) } // Type implements basetypes.ObjectValuable. @@ -2868,52 +1771,15 @@ func (a GetEncryptionKeyRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEncryptionKeyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEncryptionKeyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEncryptionKeyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "customer_managed_key_id": o.CustomerManagedKeyId, + }) } // Type implements basetypes.ObjectValuable. @@ -2940,60 +1806,23 @@ func (newState *GetNetworkRequest) SyncEffectiveFieldsDuringRead(existingState G // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetNetworkRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetNetworkRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetNetworkRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetNetworkRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetNetworkRequest) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetNetworkRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetNetworkRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetNetworkRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_id": o.NetworkId, + }) } // Type implements basetypes.ObjectValuable. @@ -3028,52 +1857,15 @@ func (a GetPrivateAccesRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPrivateAccesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPrivateAccesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPrivateAccesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "private_access_settings_id": o.PrivateAccessSettingsId, + }) } // Type implements basetypes.ObjectValuable. @@ -3108,52 +1900,15 @@ func (a GetStorageRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStorageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStorageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStorageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStorageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStorageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStorageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStorageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStorageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "storage_configuration_id": o.StorageConfigurationId, + }) } // Type implements basetypes.ObjectValuable. @@ -3188,52 +1943,15 @@ func (a GetVpcEndpointRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetVpcEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetVpcEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetVpcEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "vpc_endpoint_id": o.VpcEndpointId, + }) } // Type implements basetypes.ObjectValuable. @@ -3268,52 +1986,15 @@ func (a GetWorkspaceRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_id": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -3360,52 +2041,16 @@ func (a GkeConfig) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GkeConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o GkeConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GkeConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GkeConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GkeConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GkeConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GkeConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GkeConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "connectivity_type": o.ConnectivityType, + "master_ip_range": o.MasterIpRange, + }) } // Type implements basetypes.ObjectValuable. @@ -3478,52 +2123,27 @@ func (a Network) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Network{} - -// Equal implements basetypes.ObjectValuable. -func (o Network) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Network) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Network) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Network) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Network) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Network) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Network) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3584,52 +2204,16 @@ func (a NetworkHealth) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NetworkHealth{} - -// Equal implements basetypes.ObjectValuable. -func (o NetworkHealth) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NetworkHealth) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NetworkHealth) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NetworkHealth) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NetworkHealth) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NetworkHealth) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NetworkHealth) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error_message": o.ErrorMessage, + "error_type": o.ErrorType, + }) } // Type implements basetypes.ObjectValuable. @@ -3675,52 +2259,16 @@ func (a NetworkVpcEndpoints) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NetworkVpcEndpoints{} - -// Equal implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NetworkVpcEndpoints) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NetworkVpcEndpoints) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dataplane_relay": o.DataplaneRelay, + "rest_api": o.RestApi, + }) } // Type implements basetypes.ObjectValuable. @@ -3762,52 +2310,16 @@ func (a NetworkWarning) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NetworkWarning{} - -// Equal implements basetypes.ObjectValuable. -func (o NetworkWarning) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NetworkWarning) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NetworkWarning) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NetworkWarning) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NetworkWarning) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NetworkWarning) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NetworkWarning) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "warning_message": o.WarningMessage, + "warning_type": o.WarningType, + }) } // Type implements basetypes.ObjectValuable. @@ -3866,52 +2378,21 @@ func (a PrivateAccessSettings) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PrivateAccessSettings{} - -// Equal implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PrivateAccessSettings) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PrivateAccessSettings) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3951,52 +2432,13 @@ func (a ReplaceResponse) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReplaceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ReplaceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReplaceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReplaceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReplaceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReplaceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReplaceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReplaceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4029,52 +2471,15 @@ func (a RootBucketInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RootBucketInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RootBucketInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RootBucketInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RootBucketInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RootBucketInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RootBucketInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RootBucketInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RootBucketInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bucket_name": o.BucketName, + }) } // Type implements basetypes.ObjectValuable. @@ -4118,52 +2523,19 @@ func (a StorageConfiguration) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StorageConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o StorageConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StorageConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StorageConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StorageConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StorageConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StorageConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StorageConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4206,52 +2578,16 @@ func (a StsRole) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StsRole{} - -// Equal implements basetypes.ObjectValuable. -func (o StsRole) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StsRole) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StsRole) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StsRole) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StsRole) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StsRole) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StsRole) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "external_id": o.ExternalId, + "role_arn": o.RoleArn, + }) } // Type implements basetypes.ObjectValuable. @@ -4284,52 +2620,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4393,52 +2690,24 @@ func (a UpdateWorkspaceRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateWorkspaceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateWorkspaceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4518,52 +2787,20 @@ func (a UpsertPrivateAccessSettingsRequest) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpsertPrivateAccessSettingsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpsertPrivateAccessSettingsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpsertPrivateAccessSettingsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4639,52 +2876,24 @@ func (a VpcEndpoint) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = VpcEndpoint{} - -// Equal implements basetypes.ObjectValuable. -func (o VpcEndpoint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o VpcEndpoint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o VpcEndpoint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o VpcEndpoint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o VpcEndpoint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o VpcEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o VpcEndpoint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4831,52 +3040,38 @@ func (a Workspace) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Workspace{} - -// Equal implements basetypes.ObjectValuable. -func (o Workspace) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Workspace) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Workspace) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Workspace) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Workspace) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Workspace) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Workspace) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. diff --git a/internal/service/serving_tf/model.go b/internal/service/serving_tf/model.go index a0642b615..7c5fde1d3 100755 --- a/internal/service/serving_tf/model.go +++ b/internal/service/serving_tf/model.go @@ -12,18 +12,13 @@ package serving_tf import ( "context" - "fmt" - "io" "reflect" "github.com/databricks/databricks-sdk-go/service/oauth2" - 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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type Ai21LabsConfig struct { @@ -56,52 +51,16 @@ func (a Ai21LabsConfig) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Ai21LabsConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Ai21LabsConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Ai21LabsConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ai21labs_api_key": o.Ai21labsApiKey, + "ai21labs_api_key_plaintext": o.Ai21labsApiKeyPlaintext, + }) } // Type implements basetypes.ObjectValuable. @@ -152,52 +111,18 @@ func (a AiGatewayConfig) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -254,52 +179,18 @@ func (a AiGatewayGuardrailParameters) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayGuardrailParameters{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrailParameters) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailParameters) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "invalid_keywords": o.InvalidKeywords, + "pii": o.Pii, + "safety": o.Safety, + "valid_topics": o.ValidTopics, + }) } // Type implements basetypes.ObjectValuable. @@ -347,52 +238,15 @@ func (a AiGatewayGuardrailPiiBehavior) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayGuardrailPiiBehavior{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrailPiiBehavior) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrailPiiBehavior) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "behavior": o.Behavior, + }) } // Type implements basetypes.ObjectValuable. @@ -431,52 +285,16 @@ func (a AiGatewayGuardrails) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayGuardrails{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayGuardrails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayGuardrails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "input": o.Input, + "output": o.Output, + }) } // Type implements basetypes.ObjectValuable. @@ -526,52 +344,18 @@ func (a AiGatewayInferenceTableConfig) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayInferenceTableConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayInferenceTableConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayInferenceTableConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "enabled": o.Enabled, + "schema_name": o.SchemaName, + "table_name_prefix": o.TableNamePrefix, + }) } // Type implements basetypes.ObjectValuable. @@ -615,52 +399,17 @@ func (a AiGatewayRateLimit) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayRateLimit{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayRateLimit) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayRateLimit) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "calls": o.Calls, + "key": o.Key, + "renewal_period": o.RenewalPeriod, + }) } // Type implements basetypes.ObjectValuable. @@ -696,52 +445,15 @@ func (a AiGatewayUsageTrackingConfig) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AiGatewayUsageTrackingConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AiGatewayUsageTrackingConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AiGatewayUsageTrackingConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + }) } // Type implements basetypes.ObjectValuable. @@ -804,52 +516,20 @@ func (a AmazonBedrockConfig) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AmazonBedrockConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AmazonBedrockConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AmazonBedrockConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -896,52 +576,16 @@ func (a AnthropicConfig) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AnthropicConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o AnthropicConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AnthropicConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AnthropicConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AnthropicConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AnthropicConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AnthropicConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AnthropicConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "anthropic_api_key": o.AnthropicApiKey, + "anthropic_api_key_plaintext": o.AnthropicApiKeyPlaintext, + }) } // Type implements basetypes.ObjectValuable. @@ -985,52 +629,18 @@ func (a AutoCaptureConfigInput) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AutoCaptureConfigInput{} - -// Equal implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureConfigInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AutoCaptureConfigInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "catalog_name": o.CatalogName, + "enabled": o.Enabled, + "schema_name": o.SchemaName, + "table_name_prefix": o.TableNamePrefix, + }) } // Type implements basetypes.ObjectValuable. @@ -1077,52 +687,19 @@ func (a AutoCaptureConfigOutput) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AutoCaptureConfigOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureConfigOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AutoCaptureConfigOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1163,52 +740,15 @@ func (a AutoCaptureState) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AutoCaptureState{} - -// Equal implements basetypes.ObjectValuable. -func (o AutoCaptureState) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AutoCaptureState) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AutoCaptureState) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AutoCaptureState) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AutoCaptureState) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AutoCaptureState) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AutoCaptureState) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "payload_table": o.PayloadTable, + }) } // Type implements basetypes.ObjectValuable. @@ -1249,52 +789,16 @@ func (a BuildLogsRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BuildLogsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o BuildLogsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BuildLogsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BuildLogsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BuildLogsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BuildLogsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BuildLogsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BuildLogsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "served_model_name": o.ServedModelName, + }) } // Type implements basetypes.ObjectValuable. @@ -1329,52 +833,15 @@ func (a BuildLogsResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BuildLogsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o BuildLogsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BuildLogsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BuildLogsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BuildLogsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BuildLogsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BuildLogsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BuildLogsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "logs": o.Logs, + }) } // Type implements basetypes.ObjectValuable. @@ -1410,52 +877,16 @@ func (a ChatMessage) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ChatMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o ChatMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ChatMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ChatMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ChatMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ChatMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ChatMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ChatMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "role": o.Role, + }) } // Type implements basetypes.ObjectValuable. @@ -1501,52 +932,17 @@ func (a CohereConfig) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CohereConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o CohereConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CohereConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CohereConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CohereConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CohereConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CohereConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CohereConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cohere_api_base": o.CohereApiBase, + "cohere_api_key": o.CohereApiKey, + "cohere_api_key_plaintext": o.CohereApiKeyPlaintext, + }) } // Type implements basetypes.ObjectValuable. @@ -1602,52 +998,20 @@ func (a CreateServingEndpoint) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateServingEndpoint{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateServingEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateServingEndpoint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1709,52 +1073,17 @@ func (a DatabricksModelServingConfig) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DatabricksModelServingConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DatabricksModelServingConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DatabricksModelServingConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "databricks_api_token": o.DatabricksApiToken, + "databricks_api_token_plaintext": o.DatabricksApiTokenPlaintext, + "databricks_workspace_url": o.DatabricksWorkspaceUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -1791,58 +1120,23 @@ func (newState *DataframeSplitInput) SyncEffectiveFieldsDuringRead(existingState // SDK values. func (a DataframeSplitInput) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "columns": reflect.TypeOf(struct{}{}), - "data": reflect.TypeOf(struct{}{}), + "columns": reflect.TypeOf(types.Object{}), + "data": reflect.TypeOf(types.Object{}), "index": reflect.TypeOf(types.Int64{}), } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataframeSplitInput{} - -// Equal implements basetypes.ObjectValuable. -func (o DataframeSplitInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataframeSplitInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataframeSplitInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataframeSplitInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataframeSplitInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataframeSplitInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataframeSplitInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "columns": o.Columns, + "data": o.Data, + "index": o.Index, + }) } // Type implements basetypes.ObjectValuable. @@ -1882,52 +1176,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1960,52 +1215,15 @@ func (a DeleteServingEndpointRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteServingEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteServingEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteServingEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2044,52 +1262,17 @@ func (a EmbeddingsV1ResponseEmbeddingElement) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EmbeddingsV1ResponseEmbeddingElement{} - -// Equal implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EmbeddingsV1ResponseEmbeddingElement) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EmbeddingsV1ResponseEmbeddingElement) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "embedding": o.Embedding, + "index": o.Index, + "object": o.Object, + }) } // Type implements basetypes.ObjectValuable. @@ -2144,52 +1327,19 @@ func (a EndpointCoreConfigInput) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointCoreConfigInput{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2250,52 +1400,19 @@ func (a EndpointCoreConfigOutput) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointCoreConfigOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2347,52 +1464,16 @@ func (a EndpointCoreConfigSummary) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointCoreConfigSummary{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointCoreConfigSummary) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointCoreConfigSummary) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "served_entities": o.ServedEntities, + "served_models": o.ServedModels, + }) } // Type implements basetypes.ObjectValuable. @@ -2450,52 +1531,20 @@ func (a EndpointPendingConfig) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointPendingConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointPendingConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointPendingConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2551,52 +1600,16 @@ func (a EndpointState) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointState{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointState) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointState) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointState) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointState) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointState) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointState) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointState) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "config_update": o.ConfigUpdate, + "ready": o.Ready, + }) } // Type implements basetypes.ObjectValuable. @@ -2633,52 +1646,16 @@ func (a EndpointTag) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointTag{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointTag) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointTag) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointTag) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointTag) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointTag) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointTag) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointTag) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -2715,52 +1692,15 @@ func (a ExportMetricsRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportMetricsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportMetricsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportMetricsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2773,7 +1713,7 @@ func (o ExportMetricsRequest) Type(ctx context.Context) attr.Type { } type ExportMetricsResponse struct { - Contents io.ReadCloser `tfsdk:"-"` + Contents types.Object `tfsdk:"-"` } func (newState *ExportMetricsResponse) SyncEffectiveFieldsDuringCreateOrUpdate(plan ExportMetricsResponse) { @@ -2793,52 +1733,15 @@ func (a ExportMetricsResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportMetricsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportMetricsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportMetricsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "contents": o.Contents, + }) } // Type implements basetypes.ObjectValuable. @@ -2906,52 +1809,25 @@ func (a ExternalModel) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExternalModel{} - -// Equal implements basetypes.ObjectValuable. -func (o ExternalModel) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExternalModel) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExternalModel) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExternalModel) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExternalModel) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExternalModel) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExternalModel) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3015,52 +1891,17 @@ func (a ExternalModelUsageElement) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExternalModelUsageElement{} - -// Equal implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExternalModelUsageElement) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExternalModelUsageElement) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "completion_tokens": o.CompletionTokens, + "prompt_tokens": o.PromptTokens, + "total_tokens": o.TotalTokens, + }) } // Type implements basetypes.ObjectValuable. @@ -3102,52 +1943,18 @@ func (a FoundationModel) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FoundationModel{} - -// Equal implements basetypes.ObjectValuable. -func (o FoundationModel) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FoundationModel) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FoundationModel) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FoundationModel) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FoundationModel) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FoundationModel) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FoundationModel) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "display_name": o.DisplayName, + "docs": o.Docs, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -3186,52 +1993,15 @@ func (a GetOpenApiRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetOpenApiRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetOpenApiRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetOpenApiRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -3260,57 +2030,18 @@ func (newState *GetOpenApiResponse) SyncEffectiveFieldsDuringRead(existingState // retrieve the type information of the elements in complex fields at runtime. The values of the map // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetOpenApiResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) String() string { - return fmt.Sprintf("%#v", o) +// SDK values. +func (a GetOpenApiResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetOpenApiResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetOpenApiResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3343,52 +2074,15 @@ func (a GetServingEndpointPermissionLevelsRequest) GetComplexFieldTypes(ctx cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetServingEndpointPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "serving_endpoint_id": o.ServingEndpointId, + }) } // Type implements basetypes.ObjectValuable. @@ -3424,52 +2118,15 @@ func (a GetServingEndpointPermissionLevelsResponse) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetServingEndpointPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -3506,52 +2163,15 @@ func (a GetServingEndpointPermissionsRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetServingEndpointPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetServingEndpointPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "serving_endpoint_id": o.ServingEndpointId, + }) } // Type implements basetypes.ObjectValuable. @@ -3586,52 +2206,15 @@ func (a GetServingEndpointRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetServingEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetServingEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetServingEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -3690,52 +2273,18 @@ func (a GoogleCloudVertexAiConfig) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GoogleCloudVertexAiConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GoogleCloudVertexAiConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GoogleCloudVertexAiConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "private_key": o.PrivateKey, + "private_key_plaintext": o.PrivateKeyPlaintext, + "project_id": o.ProjectId, + "region": o.Region, + }) } // Type implements basetypes.ObjectValuable. @@ -3774,52 +2323,15 @@ func (a ListEndpointsResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListEndpointsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListEndpointsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListEndpointsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoints": o.Endpoints, + }) } // Type implements basetypes.ObjectValuable. @@ -3860,52 +2372,16 @@ func (a LogsRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LogsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o LogsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LogsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LogsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LogsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LogsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LogsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LogsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "served_model_name": o.ServedModelName, + }) } // Type implements basetypes.ObjectValuable. @@ -3920,7 +2396,7 @@ func (o LogsRequest) Type(ctx context.Context) attr.Type { type ModelDataPlaneInfo struct { // Information required to query DataPlane API 'query' endpoint. - QueryInfo oauth2.DataPlaneInfo `tfsdk:"query_info" tf:"optional,object"` + QueryInfo types.List `tfsdk:"query_info" tf:"optional,object"` } func (newState *ModelDataPlaneInfo) SyncEffectiveFieldsDuringCreateOrUpdate(plan ModelDataPlaneInfo) { @@ -3942,52 +2418,15 @@ func (a ModelDataPlaneInfo) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ModelDataPlaneInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ModelDataPlaneInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ModelDataPlaneInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query_info": o.QueryInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -4072,52 +2511,25 @@ func (a OpenAiConfig) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OpenAiConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o OpenAiConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OpenAiConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OpenAiConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OpenAiConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OpenAiConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OpenAiConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OpenAiConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4169,52 +2581,16 @@ func (a PaLmConfig) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PaLmConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o PaLmConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PaLmConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PaLmConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PaLmConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PaLmConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PaLmConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PaLmConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "palm_api_key": o.PalmApiKey, + "palm_api_key_plaintext": o.PalmApiKeyPlaintext, + }) } // Type implements basetypes.ObjectValuable. @@ -4257,52 +2633,17 @@ func (a PatchServingEndpointTags) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PatchServingEndpointTags{} - -// Equal implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PatchServingEndpointTags) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PatchServingEndpointTags) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "add_tags": o.AddTags, + "delete_tags": o.DeleteTags, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -4346,52 +2687,17 @@ func (a PayloadTable) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PayloadTable{} - -// Equal implements basetypes.ObjectValuable. -func (o PayloadTable) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PayloadTable) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PayloadTable) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PayloadTable) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PayloadTable) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PayloadTable) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PayloadTable) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "status": o.Status, + "status_message": o.StatusMessage, + }) } // Type implements basetypes.ObjectValuable. @@ -4447,52 +2753,19 @@ func (a PutAiGatewayRequest) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutAiGatewayRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutAiGatewayRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutAiGatewayRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4554,52 +2827,18 @@ func (a PutAiGatewayResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutAiGatewayResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutAiGatewayResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutAiGatewayResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4650,52 +2889,16 @@ func (a PutRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o PutRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "rate_limits": o.RateLimits, + }) } // Type implements basetypes.ObjectValuable. @@ -4734,52 +2937,15 @@ func (a PutResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PutResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "rate_limits": o.RateLimits, + }) } // Type implements basetypes.ObjectValuable. @@ -4806,9 +2972,9 @@ type QueryEndpointInput struct { // 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 any `tfsdk:"input" tf:"optional"` + Input types.Object `tfsdk:"input" tf:"optional"` // Tensor-based input in columnar format. - Inputs any `tfsdk:"inputs" tf:"optional"` + 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 & @@ -4829,7 +2995,7 @@ type QueryEndpointInput struct { // 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 any `tfsdk:"prompt" tf:"optional"` + 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. @@ -4860,61 +3026,37 @@ func (newState *QueryEndpointInput) SyncEffectiveFieldsDuringRead(existingState // SDK values. func (a QueryEndpointInput) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "dataframe_records": reflect.TypeOf(struct{}{}), + "dataframe_records": reflect.TypeOf(types.Object{}), "dataframe_split": reflect.TypeOf(DataframeSplitInput{}), "extra_params": reflect.TypeOf(types.String{}), - "instances": reflect.TypeOf(struct{}{}), + "instances": reflect.TypeOf(types.Object{}), "messages": reflect.TypeOf(ChatMessage{}), "stop": reflect.TypeOf(types.String{}), } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryEndpointInput{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryEndpointInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryEndpointInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryEndpointInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryEndpointInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryEndpointInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryEndpointInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryEndpointInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4999,57 +3141,28 @@ func (a QueryEndpointResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{ "choices": reflect.TypeOf(V1ResponseChoiceElement{}), "data": reflect.TypeOf(EmbeddingsV1ResponseEmbeddingElement{}), - "predictions": reflect.TypeOf(struct{}{}), + "predictions": reflect.TypeOf(types.Object{}), "usage": reflect.TypeOf(ExternalModelUsageElement{}), } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryEndpointResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryEndpointResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryEndpointResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5099,60 +3212,25 @@ func (newState *RateLimit) SyncEffectiveFieldsDuringRead(existingState RateLimit // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RateLimit{} - -// Equal implements basetypes.ObjectValuable. -func (o RateLimit) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RateLimit) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RateLimit) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RateLimit) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o RateLimit) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RateLimit) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RateLimit) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "calls": o.Calls, + "key": o.Key, + "renewal_period": o.RenewalPeriod, + }) } // Type implements basetypes.ObjectValuable. @@ -5191,52 +3269,16 @@ func (a Route) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Route{} - -// Equal implements basetypes.ObjectValuable. -func (o Route) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Route) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Route) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Route) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Route) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Route) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Route) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "served_model_name": o.ServedModelName, + "traffic_percentage": o.TrafficPercentage, + }) } // Type implements basetypes.ObjectValuable. @@ -5330,52 +3372,25 @@ func (a ServedEntityInput) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedEntityInput{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedEntityInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedEntityInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedEntityInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedEntityInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedEntityInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedEntityInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedEntityInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5486,52 +3501,29 @@ func (a ServedEntityOutput) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedEntityOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedEntityOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedEntityOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedEntityOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedEntityOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedEntityOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedEntityOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedEntityOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5607,52 +3599,19 @@ func (a ServedEntitySpec) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedEntitySpec{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedEntitySpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedEntitySpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedEntitySpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedEntitySpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedEntitySpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedEntitySpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedEntitySpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5739,52 +3698,24 @@ func (a ServedModelInput) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedModelInput{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedModelInput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedModelInput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedModelInput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedModelInput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedModelInput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedModelInput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedModelInput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5873,52 +3804,25 @@ func (a ServedModelOutput) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedModelOutput{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedModelOutput) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedModelOutput) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedModelOutput) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedModelOutput) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedModelOutput) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedModelOutput) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedModelOutput) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5972,52 +3876,17 @@ func (a ServedModelSpec) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedModelSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedModelSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedModelSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedModelSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedModelSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedModelSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedModelSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedModelSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "model_name": o.ModelName, + "model_version": o.ModelVersion, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -6066,52 +3935,16 @@ func (a ServedModelState) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServedModelState{} - -// Equal implements basetypes.ObjectValuable. -func (o ServedModelState) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServedModelState) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServedModelState) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServedModelState) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServedModelState) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServedModelState) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServedModelState) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "deployment": o.Deployment, + "deployment_state_message": o.DeploymentStateMessage, + }) } // Type implements basetypes.ObjectValuable. @@ -6147,52 +3980,15 @@ func (a ServerLogsResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServerLogsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ServerLogsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServerLogsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServerLogsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServerLogsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServerLogsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServerLogsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServerLogsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "logs": o.Logs, + }) } // Type implements basetypes.ObjectValuable. @@ -6251,52 +4047,24 @@ func (a ServingEndpoint) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpoint{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpoint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpoint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpoint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpoint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpoint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpoint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6353,52 +4121,18 @@ func (a ServingEndpointAccessControlRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6445,52 +4179,19 @@ func (a ServingEndpointAccessControlResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6568,52 +4269,29 @@ func (a ServingEndpointDetailed) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointDetailed{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointDetailed) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointDetailed) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6678,52 +4356,17 @@ func (a ServingEndpointPermission) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -6766,52 +4409,17 @@ func (a ServingEndpointPermissions) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -6850,52 +4458,16 @@ func (a ServingEndpointPermissionsDescription) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -6933,52 +4505,16 @@ func (a ServingEndpointPermissionsRequest) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServingEndpointPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServingEndpointPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServingEndpointPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "serving_endpoint_id": o.ServingEndpointId, + }) } // Type implements basetypes.ObjectValuable. @@ -7017,52 +4553,15 @@ func (a TrafficConfig) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TrafficConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o TrafficConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TrafficConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TrafficConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TrafficConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TrafficConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TrafficConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TrafficConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "routes": o.Routes, + }) } // Type implements basetypes.ObjectValuable. @@ -7108,52 +4607,19 @@ func (a V1ResponseChoiceElement) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = V1ResponseChoiceElement{} - -// Equal implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o V1ResponseChoiceElement) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o V1ResponseChoiceElement) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "finishReason": o.FinishReason, + "index": o.Index, + "logprobs": o.Logprobs, + "message": o.Message, + "text": o.Text, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/settings_tf/model.go b/internal/service/settings_tf/model.go index 6a4ed0c2e..4bed86c77 100755 --- a/internal/service/settings_tf/model.go +++ b/internal/service/settings_tf/model.go @@ -12,15 +12,11 @@ package settings_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AibiDashboardEmbeddingAccessPolicy struct { @@ -44,52 +40,15 @@ func (a AibiDashboardEmbeddingAccessPolicy) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AibiDashboardEmbeddingAccessPolicy{} - -// Equal implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingAccessPolicy) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicy) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_policy_type": o.AccessPolicyType, + }) } // Type implements basetypes.ObjectValuable. @@ -138,52 +97,17 @@ func (a AibiDashboardEmbeddingAccessPolicySetting) GetComplexFieldTypes(ctx cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AibiDashboardEmbeddingAccessPolicySetting{} - -// Equal implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingAccessPolicySetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingAccessPolicySetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aibi_dashboard_embedding_access_policy": o.AibiDashboardEmbeddingAccessPolicy, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -222,52 +146,15 @@ func (a AibiDashboardEmbeddingApprovedDomains) GetComplexFieldTypes(ctx context. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AibiDashboardEmbeddingApprovedDomains{} - -// Equal implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingApprovedDomains) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomains) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "approved_domains": o.ApprovedDomains, + }) } // Type implements basetypes.ObjectValuable. @@ -318,52 +205,17 @@ func (a AibiDashboardEmbeddingApprovedDomainsSetting) GetComplexFieldTypes(ctx c } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AibiDashboardEmbeddingApprovedDomainsSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AibiDashboardEmbeddingApprovedDomainsSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AibiDashboardEmbeddingApprovedDomainsSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aibi_dashboard_embedding_approved_domains": o.AibiDashboardEmbeddingApprovedDomains, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -416,52 +268,17 @@ func (a AutomaticClusterUpdateSetting) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AutomaticClusterUpdateSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AutomaticClusterUpdateSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AutomaticClusterUpdateSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "automatic_cluster_update_workspace": o.AutomaticClusterUpdateWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -498,52 +315,15 @@ func (a BooleanMessage) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BooleanMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o BooleanMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BooleanMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BooleanMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BooleanMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BooleanMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BooleanMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BooleanMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -592,52 +372,19 @@ func (a ClusterAutoRestartMessage) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAutoRestartMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -690,52 +437,17 @@ func (a ClusterAutoRestartMessageEnablementDetails) GetComplexFieldTypes(ctx con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAutoRestartMessageEnablementDetails{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageEnablementDetails) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageEnablementDetails) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -772,52 +484,15 @@ func (a ClusterAutoRestartMessageMaintenanceWindow) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAutoRestartMessageMaintenanceWindow{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindow) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindow) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "week_day_based_schedule": o.WeekDayBasedSchedule, + }) } // Type implements basetypes.ObjectValuable. @@ -858,52 +533,17 @@ func (a ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) GetCompl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWeekDayBasedSchedule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "day_of_week": o.DayOfWeek, + "frequency": o.Frequency, + "window_start_time": o.WindowStartTime, + }) } // Type implements basetypes.ObjectValuable. @@ -942,52 +582,16 @@ func (a ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) GetComplexFie return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ClusterAutoRestartMessageMaintenanceWindowWindowStartTime{} - -// Equal implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ClusterAutoRestartMessageMaintenanceWindowWindowStartTime) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "hours": o.Hours, + "minutes": o.Minutes, + }) } // Type implements basetypes.ObjectValuable. @@ -1027,52 +631,16 @@ func (a ComplianceSecurityProfile) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ComplianceSecurityProfile{} - -// Equal implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ComplianceSecurityProfile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "compliance_standards": o.ComplianceStandards, + "is_enabled": o.IsEnabled, + }) } // Type implements basetypes.ObjectValuable. @@ -1125,52 +693,17 @@ func (a ComplianceSecurityProfileSetting) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ComplianceSecurityProfileSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ComplianceSecurityProfileSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ComplianceSecurityProfileSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "compliance_security_profile_workspace": o.ComplianceSecurityProfileWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -1221,52 +754,19 @@ func (a Config) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Config{} - -// Equal implements basetypes.ObjectValuable. -func (o Config) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Config) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Config) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Config) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Config) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Config) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Config) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1325,52 +825,17 @@ func (a CreateIpAccessList) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateIpAccessList{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateIpAccessList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateIpAccessList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateIpAccessList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateIpAccessList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateIpAccessList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateIpAccessList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateIpAccessList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_addresses": o.IpAddresses, + "label": o.Label, + "list_type": o.ListType, + }) } // Type implements basetypes.ObjectValuable. @@ -1411,52 +876,15 @@ func (a CreateIpAccessListResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateIpAccessListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateIpAccessListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) } // Type implements basetypes.ObjectValuable. @@ -1499,52 +927,16 @@ func (a CreateNetworkConnectivityConfigRequest) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateNetworkConnectivityConfigRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateNetworkConnectivityConfigRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateNetworkConnectivityConfigRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "region": o.Region, + }) } // Type implements basetypes.ObjectValuable. @@ -1584,52 +976,16 @@ func (a CreateNotificationDestinationRequest) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateNotificationDestinationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateNotificationDestinationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateNotificationDestinationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "config": o.Config, + "display_name": o.DisplayName, + }) } // Type implements basetypes.ObjectValuable. @@ -1671,52 +1027,17 @@ func (a CreateOboTokenRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateOboTokenRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateOboTokenRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateOboTokenRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "application_id": o.ApplicationId, + "comment": o.Comment, + "lifetime_seconds": o.LifetimeSeconds, + }) } // Type implements basetypes.ObjectValuable. @@ -1756,52 +1077,16 @@ func (a CreateOboTokenResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateOboTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateOboTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateOboTokenResponse) 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. @@ -1844,52 +1129,17 @@ func (a CreatePrivateEndpointRuleRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreatePrivateEndpointRuleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreatePrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreatePrivateEndpointRuleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "group_id": o.GroupId, + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "resource_id": o.ResourceId, + }) } // Type implements basetypes.ObjectValuable. @@ -1929,52 +1179,16 @@ func (a CreateTokenRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateTokenRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateTokenRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateTokenRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateTokenRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateTokenRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateTokenRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateTokenRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateTokenRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "lifetime_seconds": o.LifetimeSeconds, + }) } // Type implements basetypes.ObjectValuable. @@ -2013,52 +1227,16 @@ func (a CreateTokenResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateTokenResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_info": o.TokenInfo, + "token_value": o.TokenValue, + }) } // Type implements basetypes.ObjectValuable. @@ -2101,52 +1279,16 @@ func (a CspEnablementAccount) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CspEnablementAccount{} - -// Equal implements basetypes.ObjectValuable. -func (o CspEnablementAccount) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CspEnablementAccount) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CspEnablementAccount) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CspEnablementAccount) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CspEnablementAccount) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CspEnablementAccount) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CspEnablementAccount) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "compliance_standards": o.ComplianceStandards, + "is_enforced": o.IsEnforced, + }) } // Type implements basetypes.ObjectValuable. @@ -2199,52 +1341,17 @@ func (a CspEnablementAccountSetting) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CspEnablementAccountSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CspEnablementAccountSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CspEnablementAccountSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "csp_enablement_account": o.CspEnablementAccount, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -2307,52 +1414,17 @@ func (a DefaultNamespaceSetting) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DefaultNamespaceSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DefaultNamespaceSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DefaultNamespaceSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "namespace": o.Namespace, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -2391,52 +1463,15 @@ func (a DeleteAccountIpAccessListRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAccountIpAccessListRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAccountIpAccessListRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAccountIpAccessListRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) } // Type implements basetypes.ObjectValuable. @@ -2477,52 +1512,15 @@ func (a DeleteDefaultNamespaceSettingRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDefaultNamespaceSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2563,52 +1561,15 @@ func (a DeleteDefaultNamespaceSettingResponse) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDefaultNamespaceSettingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDefaultNamespaceSettingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDefaultNamespaceSettingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2649,52 +1610,15 @@ func (a DeleteDisableLegacyAccessRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyAccessRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2735,52 +1659,15 @@ func (a DeleteDisableLegacyAccessResponse) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyAccessResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyAccessResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyAccessResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2821,52 +1708,15 @@ func (a DeleteDisableLegacyDbfsRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyDbfsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2907,52 +1757,15 @@ func (a DeleteDisableLegacyDbfsResponse) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyDbfsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyDbfsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyDbfsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -2993,52 +1806,15 @@ func (a DeleteDisableLegacyFeaturesRequest) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyFeaturesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -3079,52 +1855,15 @@ func (a DeleteDisableLegacyFeaturesResponse) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDisableLegacyFeaturesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDisableLegacyFeaturesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDisableLegacyFeaturesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -3159,52 +1898,15 @@ func (a DeleteIpAccessListRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteIpAccessListRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteIpAccessListRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteIpAccessListRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) } // Type implements basetypes.ObjectValuable. @@ -3239,52 +1941,15 @@ func (a DeleteNetworkConnectivityConfigurationRequest) GetComplexFieldTypes(ctx return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteNetworkConnectivityConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteNetworkConnectivityConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + }) } // Type implements basetypes.ObjectValuable. @@ -3316,52 +1981,13 @@ func (a DeleteNetworkConnectivityConfigurationResponse) GetComplexFieldTypes(ctx return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteNetworkConnectivityConfigurationResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteNetworkConnectivityConfigurationResponse +// only implements ToObjectValue() and Type(). +func (o DeleteNetworkConnectivityConfigurationResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteNetworkConnectivityConfigurationResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3393,52 +2019,15 @@ func (a DeleteNotificationDestinationRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteNotificationDestinationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteNotificationDestinationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteNotificationDestinationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3479,52 +2068,15 @@ func (a DeletePersonalComputeSettingRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePersonalComputeSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePersonalComputeSettingRequest) 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. @@ -3565,52 +2117,15 @@ func (a DeletePersonalComputeSettingResponse) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePersonalComputeSettingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePersonalComputeSettingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePersonalComputeSettingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -3647,52 +2162,16 @@ func (a DeletePrivateEndpointRuleRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeletePrivateEndpointRuleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeletePrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeletePrivateEndpointRuleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "private_endpoint_rule_id": o.PrivateEndpointRuleId, + }) } // Type implements basetypes.ObjectValuable. @@ -3725,52 +2204,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3809,52 +2249,15 @@ func (a DeleteRestrictWorkspaceAdminsSettingRequest) GetComplexFieldTypes(ctx co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRestrictWorkspaceAdminsSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -3895,52 +2298,15 @@ func (a DeleteRestrictWorkspaceAdminsSettingResponse) GetComplexFieldTypes(ctx c return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRestrictWorkspaceAdminsSettingResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRestrictWorkspaceAdminsSettingResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRestrictWorkspaceAdminsSettingResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -3975,52 +2341,15 @@ func (a DeleteTokenManagementRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteTokenManagementRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteTokenManagementRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteTokenManagementRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_id": o.TokenId, + }) } // Type implements basetypes.ObjectValuable. @@ -4069,52 +2398,17 @@ func (a DisableLegacyAccess) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DisableLegacyAccess{} - -// Equal implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyAccess) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DisableLegacyAccess) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "disable_legacy_access": o.DisableLegacyAccess, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -4167,52 +2461,17 @@ func (a DisableLegacyDbfs) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DisableLegacyDbfs{} - -// Equal implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyDbfs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DisableLegacyDbfs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "disable_legacy_dbfs": o.DisableLegacyDbfs, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -4265,52 +2524,17 @@ func (a DisableLegacyFeatures) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DisableLegacyFeatures{} - -// Equal implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DisableLegacyFeatures) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DisableLegacyFeatures) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "disable_legacy_features": o.DisableLegacyFeatures, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -4350,52 +2574,15 @@ func (a EmailConfig) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EmailConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o EmailConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EmailConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EmailConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EmailConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EmailConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EmailConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EmailConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "addresses": o.Addresses, + }) } // Type implements basetypes.ObjectValuable. @@ -4429,52 +2616,13 @@ func (a Empty) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Empty{} - -// Equal implements basetypes.ObjectValuable. -func (o Empty) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Empty) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Empty) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Empty) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Empty) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Empty) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Empty) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4506,52 +2654,15 @@ func (a EnhancedSecurityMonitoring) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnhancedSecurityMonitoring{} - -// Equal implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnhancedSecurityMonitoring) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoring) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_enabled": o.IsEnabled, + }) } // Type implements basetypes.ObjectValuable. @@ -4601,52 +2712,17 @@ func (a EnhancedSecurityMonitoringSetting) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnhancedSecurityMonitoringSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnhancedSecurityMonitoringSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnhancedSecurityMonitoringSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enhanced_security_monitoring_workspace": o.EnhancedSecurityMonitoringWorkspace, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -4684,52 +2760,15 @@ func (a EsmEnablementAccount) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EsmEnablementAccount{} - -// Equal implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EsmEnablementAccount) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EsmEnablementAccount) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "is_enforced": o.IsEnforced, + }) } // Type implements basetypes.ObjectValuable. @@ -4779,52 +2818,17 @@ func (a EsmEnablementAccountSetting) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EsmEnablementAccountSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EsmEnablementAccountSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EsmEnablementAccountSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "esm_enablement_account": o.EsmEnablementAccount, + "etag": o.Etag, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -4874,52 +2878,19 @@ func (a ExchangeToken) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExchangeToken{} - -// Equal implements basetypes.ObjectValuable. -func (o ExchangeToken) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExchangeToken) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExchangeToken) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExchangeToken) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExchangeToken) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExchangeToken) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExchangeToken) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential": o.Credential, + "credentialEolTime": o.CredentialEolTime, + "ownerId": o.OwnerId, + "scopes": o.Scopes, + "tokenType": o.TokenType, + }) } // Type implements basetypes.ObjectValuable. @@ -4968,52 +2939,17 @@ func (a ExchangeTokenRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExchangeTokenRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExchangeTokenRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExchangeTokenRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "partitionId": o.PartitionId, + "scopes": o.Scopes, + "tokenType": o.TokenType, + }) } // Type implements basetypes.ObjectValuable. @@ -5057,52 +2993,15 @@ func (a ExchangeTokenResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExchangeTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExchangeTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExchangeTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -5141,62 +3040,25 @@ func (a FetchIpAccessListResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = FetchIpAccessListResponse{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o FetchIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o FetchIpAccessListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -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), - }, - }, +// Type implements basetypes.ObjectValuable. +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), + }, + }, } } @@ -5232,52 +3094,20 @@ func (a GenericWebhookConfig) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GenericWebhookConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GenericWebhookConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GenericWebhookConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5317,52 +3147,15 @@ func (a GetAccountIpAccessListRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAccountIpAccessListRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAccountIpAccessListRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAccountIpAccessListRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) } // Type implements basetypes.ObjectValuable. @@ -5403,52 +3196,15 @@ func (a GetAibiDashboardEmbeddingAccessPolicySettingRequest) GetComplexFieldType return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAibiDashboardEmbeddingAccessPolicySettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingAccessPolicySettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5489,52 +3245,15 @@ func (a GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) GetComplexFieldT return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAibiDashboardEmbeddingApprovedDomainsSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5575,52 +3294,15 @@ func (a GetAutomaticClusterUpdateSettingRequest) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAutomaticClusterUpdateSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAutomaticClusterUpdateSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAutomaticClusterUpdateSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5661,52 +3343,15 @@ func (a GetComplianceSecurityProfileSettingRequest) GetComplexFieldTypes(ctx con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetComplianceSecurityProfileSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetComplianceSecurityProfileSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetComplianceSecurityProfileSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5747,52 +3392,15 @@ func (a GetCspEnablementAccountSettingRequest) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCspEnablementAccountSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCspEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCspEnablementAccountSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5833,52 +3441,15 @@ func (a GetDefaultNamespaceSettingRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDefaultNamespaceSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDefaultNamespaceSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -5919,52 +3490,15 @@ func (a GetDisableLegacyAccessRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDisableLegacyAccessRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyAccessRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6005,52 +3539,15 @@ func (a GetDisableLegacyDbfsRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDisableLegacyDbfsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyDbfsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6091,52 +3588,15 @@ func (a GetDisableLegacyFeaturesRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDisableLegacyFeaturesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDisableLegacyFeaturesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6177,52 +3637,15 @@ func (a GetEnhancedSecurityMonitoringSettingRequest) GetComplexFieldTypes(ctx co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEnhancedSecurityMonitoringSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEnhancedSecurityMonitoringSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEnhancedSecurityMonitoringSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6263,52 +3686,15 @@ func (a GetEsmEnablementAccountSettingRequest) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEsmEnablementAccountSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEsmEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEsmEnablementAccountSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6343,52 +3729,15 @@ func (a GetIpAccessListRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetIpAccessListRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetIpAccessListRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list_id": o.IpAccessListId, + }) } // Type implements basetypes.ObjectValuable. @@ -6424,52 +3773,15 @@ func (a GetIpAccessListResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetIpAccessListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetIpAccessListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_list": o.IpAccessList, + }) } // Type implements basetypes.ObjectValuable. @@ -6507,52 +3819,15 @@ func (a GetIpAccessListsResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetIpAccessListsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetIpAccessListsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetIpAccessListsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_lists": o.IpAccessLists, + }) } // Type implements basetypes.ObjectValuable. @@ -6589,52 +3864,15 @@ func (a GetNetworkConnectivityConfigurationRequest) GetComplexFieldTypes(ctx con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetNetworkConnectivityConfigurationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetNetworkConnectivityConfigurationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetNetworkConnectivityConfigurationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + }) } // Type implements basetypes.ObjectValuable. @@ -6668,52 +3906,15 @@ func (a GetNotificationDestinationRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetNotificationDestinationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetNotificationDestinationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetNotificationDestinationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -6754,52 +3955,15 @@ func (a GetPersonalComputeSettingRequest) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPersonalComputeSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPersonalComputeSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPersonalComputeSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -6836,52 +4000,16 @@ func (a GetPrivateEndpointRuleRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetPrivateEndpointRuleRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetPrivateEndpointRuleRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetPrivateEndpointRuleRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "private_endpoint_rule_id": o.PrivateEndpointRuleId, + }) } // Type implements basetypes.ObjectValuable. @@ -6923,52 +4051,15 @@ func (a GetRestrictWorkspaceAdminsSettingRequest) GetComplexFieldTypes(ctx conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRestrictWorkspaceAdminsSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRestrictWorkspaceAdminsSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + }) } // Type implements basetypes.ObjectValuable. @@ -7002,52 +4093,15 @@ func (a GetStatusRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "keys": o.Keys, + }) } // Type implements basetypes.ObjectValuable. @@ -7082,52 +4136,15 @@ func (a GetTokenManagementRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetTokenManagementRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetTokenManagementRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetTokenManagementRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_id": o.TokenId, + }) } // Type implements basetypes.ObjectValuable. @@ -7163,52 +4180,15 @@ func (a GetTokenPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetTokenPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetTokenPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetTokenPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -7242,56 +4222,19 @@ func (newState *GetTokenResponse) SyncEffectiveFieldsDuringRead(existingState Ge // SDK values. func (a GetTokenResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "token_info": reflect.TypeOf(TokenInfo{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false + "token_info": reflect.TypeOf(TokenInfo{}), } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetTokenResponse) String() string { - return fmt.Sprintf("%#v", o) } -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_info": o.TokenInfo, + }) } // Type implements basetypes.ObjectValuable. @@ -7353,52 +4296,24 @@ func (a IpAccessListInfo) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = IpAccessListInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o IpAccessListInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o IpAccessListInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o IpAccessListInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o IpAccessListInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o IpAccessListInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o IpAccessListInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o IpAccessListInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7445,52 +4360,15 @@ func (a ListIpAccessListResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListIpAccessListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListIpAccessListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListIpAccessListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "ip_access_lists": o.IpAccessLists, + }) } // Type implements basetypes.ObjectValuable. @@ -7530,52 +4408,16 @@ func (a ListNccAzurePrivateEndpointRulesResponse) GetComplexFieldTypes(ctx conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNccAzurePrivateEndpointRulesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNccAzurePrivateEndpointRulesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNccAzurePrivateEndpointRulesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "items": o.Items, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7613,52 +4455,15 @@ func (a ListNetworkConnectivityConfigurationsRequest) GetComplexFieldTypes(ctx c return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNetworkConnectivityConfigurationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNetworkConnectivityConfigurationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7696,52 +4501,16 @@ func (a ListNetworkConnectivityConfigurationsResponse) GetComplexFieldTypes(ctx } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNetworkConnectivityConfigurationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNetworkConnectivityConfigurationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNetworkConnectivityConfigurationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "items": o.Items, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7780,52 +4549,16 @@ func (a ListNotificationDestinationsRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNotificationDestinationsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7864,52 +4597,16 @@ func (a ListNotificationDestinationsResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNotificationDestinationsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -7951,52 +4648,17 @@ func (a ListNotificationDestinationsResult) GetComplexFieldTypes(ctx context.Con return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListNotificationDestinationsResult{} - -// Equal implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListNotificationDestinationsResult) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListNotificationDestinationsResult) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "destination_type": o.DestinationType, + "display_name": o.DisplayName, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -8035,52 +4697,16 @@ func (a ListPrivateEndpointRulesRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPrivateEndpointRulesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPrivateEndpointRulesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPrivateEndpointRulesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "network_connectivity_config_id": o.NetworkConnectivityConfigId, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -8117,52 +4743,15 @@ func (a ListPublicTokensResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListPublicTokensResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListPublicTokensResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListPublicTokensResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_infos": o.TokenInfos, + }) } // Type implements basetypes.ObjectValuable. @@ -8201,52 +4790,16 @@ func (a ListTokenManagementRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTokenManagementRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTokenManagementRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTokenManagementRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "created_by_id": o.CreatedById, + "created_by_username": o.CreatedByUsername, + }) } // Type implements basetypes.ObjectValuable. @@ -8284,52 +4837,15 @@ func (a ListTokensResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListTokensResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListTokensResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListTokensResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListTokensResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListTokensResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListTokensResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListTokensResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListTokensResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_infos": o.TokenInfos, + }) } // Type implements basetypes.ObjectValuable. @@ -8367,52 +4883,16 @@ func (a MicrosoftTeamsConfig) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MicrosoftTeamsConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MicrosoftTeamsConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MicrosoftTeamsConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "url": o.Url, + "url_set": o.UrlSet, + }) } // Type implements basetypes.ObjectValuable. @@ -8452,52 +4932,15 @@ func (a NccAwsStableIpRule) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccAwsStableIpRule{} - -// Equal implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccAwsStableIpRule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccAwsStableIpRule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "cidr_blocks": o.CidrBlocks, + }) } // Type implements basetypes.ObjectValuable. @@ -8566,52 +5009,24 @@ func (a NccAzurePrivateEndpointRule) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccAzurePrivateEndpointRule{} - -// Equal implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccAzurePrivateEndpointRule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccAzurePrivateEndpointRule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8665,52 +5080,17 @@ func (a NccAzureServiceEndpointRule) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccAzureServiceEndpointRule{} - -// Equal implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccAzureServiceEndpointRule) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccAzureServiceEndpointRule) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "subnets": o.Subnets, + "target_region": o.TargetRegion, + "target_services": o.TargetServices, + }) } // Type implements basetypes.ObjectValuable. @@ -8760,52 +5140,16 @@ func (a NccEgressConfig) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccEgressConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o NccEgressConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccEgressConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccEgressConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccEgressConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccEgressConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccEgressConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccEgressConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "default_rules": o.DefaultRules, + "target_rules": o.TargetRules, + }) } // Type implements basetypes.ObjectValuable. @@ -8856,52 +5200,16 @@ func (a NccEgressDefaultRules) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccEgressDefaultRules{} - -// Equal implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccEgressDefaultRules) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccEgressDefaultRules) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "aws_stable_ip_rule": o.AwsStableIpRule, + "azure_service_endpoint_rule": o.AzureServiceEndpointRule, + }) } // Type implements basetypes.ObjectValuable. @@ -8939,56 +5247,19 @@ func (newState *NccEgressTargetRules) SyncEffectiveFieldsDuringRead(existingStat // SDK values. func (a NccEgressTargetRules) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { return map[string]reflect.Type{ - "azure_private_endpoint_rules": reflect.TypeOf(NccAzurePrivateEndpointRule{}), - } -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NccEgressTargetRules{} - -// Equal implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) String() string { - return fmt.Sprintf("%#v", o) + "azure_private_endpoint_rules": reflect.TypeOf(NccAzurePrivateEndpointRule{}), + } } -// ToObjectValue implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NccEgressTargetRules) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NccEgressTargetRules) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "azure_private_endpoint_rules": o.AzurePrivateEndpointRules, + }) } // Type implements basetypes.ObjectValuable. @@ -9044,52 +5315,21 @@ func (a NetworkConnectivityConfiguration) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NetworkConnectivityConfiguration{} - -// Equal implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NetworkConnectivityConfiguration) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NetworkConnectivityConfiguration) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9142,52 +5382,18 @@ func (a NotificationDestination) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NotificationDestination{} - -// Equal implements basetypes.ObjectValuable. -func (o NotificationDestination) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NotificationDestination) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NotificationDestination) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NotificationDestination) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NotificationDestination) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NotificationDestination) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NotificationDestination) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "config": o.Config, + "destination_type": o.DestinationType, + "display_name": o.DisplayName, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -9228,52 +5434,16 @@ func (a PagerdutyConfig) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PagerdutyConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o PagerdutyConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PagerdutyConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PagerdutyConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PagerdutyConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PagerdutyConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PagerdutyConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PagerdutyConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "integration_key": o.IntegrationKey, + "integration_key_set": o.IntegrationKeySet, + }) } // Type implements basetypes.ObjectValuable. @@ -9309,52 +5479,15 @@ func (a PartitionId) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PartitionId{} - -// Equal implements basetypes.ObjectValuable. -func (o PartitionId) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PartitionId) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PartitionId) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PartitionId) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PartitionId) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PartitionId) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PartitionId) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspaceId": o.WorkspaceId, + }) } // Type implements basetypes.ObjectValuable. @@ -9394,52 +5527,15 @@ func (a PersonalComputeMessage) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PersonalComputeMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PersonalComputeMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PersonalComputeMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -9489,52 +5585,17 @@ func (a PersonalComputeSetting) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PersonalComputeSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PersonalComputeSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PersonalComputeSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "personal_compute": o.PersonalCompute, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -9579,52 +5640,18 @@ func (a PublicTokenInfo) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PublicTokenInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o PublicTokenInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PublicTokenInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PublicTokenInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PublicTokenInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PublicTokenInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PublicTokenInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PublicTokenInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "creation_time": o.CreationTime, + "expiry_time": o.ExpiryTime, + "token_id": o.TokenId, + }) } // Type implements basetypes.ObjectValuable. @@ -9677,52 +5704,19 @@ func (a ReplaceIpAccessList) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReplaceIpAccessList{} - -// Equal implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReplaceIpAccessList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReplaceIpAccessList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9760,52 +5754,13 @@ func (a ReplaceResponse) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ReplaceResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ReplaceResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ReplaceResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ReplaceResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ReplaceResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ReplaceResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ReplaceResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ReplaceResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -9836,52 +5791,15 @@ func (a RestrictWorkspaceAdminsMessage) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestrictWorkspaceAdminsMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestrictWorkspaceAdminsMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -9931,52 +5849,17 @@ func (a RestrictWorkspaceAdminsSetting) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestrictWorkspaceAdminsSetting{} - -// Equal implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestrictWorkspaceAdminsSetting) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestrictWorkspaceAdminsSetting) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "etag": o.Etag, + "restrict_workspace_admins": o.RestrictWorkspaceAdmins, + "setting_name": o.SettingName, + }) } // Type implements basetypes.ObjectValuable. @@ -10014,52 +5897,15 @@ func (a RevokeTokenRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RevokeTokenRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RevokeTokenRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RevokeTokenRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "token_id": o.TokenId, + }) } // Type implements basetypes.ObjectValuable. @@ -10091,52 +5937,13 @@ func (a RevokeTokenResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RevokeTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RevokeTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RevokeTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10166,52 +5973,13 @@ func (a SetStatusResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetStatusResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetStatusResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetStatusResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetStatusResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetStatusResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetStatusResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetStatusResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetStatusResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10245,52 +6013,16 @@ func (a SlackConfig) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SlackConfig{} - -// Equal implements basetypes.ObjectValuable. -func (o SlackConfig) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SlackConfig) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SlackConfig) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SlackConfig) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SlackConfig) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SlackConfig) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SlackConfig) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "url": o.Url, + "url_set": o.UrlSet, + }) } // Type implements basetypes.ObjectValuable. @@ -10325,52 +6057,15 @@ func (a StringMessage) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StringMessage{} - -// Equal implements basetypes.ObjectValuable. -func (o StringMessage) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StringMessage) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StringMessage) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StringMessage) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StringMessage) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StringMessage) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StringMessage) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -10410,52 +6105,18 @@ func (a TokenAccessControlRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10502,52 +6163,19 @@ func (a TokenAccessControlResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10605,52 +6233,23 @@ func (a TokenInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10697,52 +6296,17 @@ func (a TokenPermission) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -10785,52 +6349,17 @@ func (a TokenPermissions) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -10869,52 +6398,16 @@ func (a TokenPermissionsDescription) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -10950,52 +6443,15 @@ func (a TokenPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TokenPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TokenPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TokenPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + }) } // Type implements basetypes.ObjectValuable. @@ -11042,52 +6498,17 @@ func (a UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) GetComplexFieldT } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAibiDashboardEmbeddingAccessPolicySettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingAccessPolicySettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11136,52 +6557,17 @@ func (a UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) GetComplexFie } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAibiDashboardEmbeddingApprovedDomainsSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11230,52 +6616,17 @@ func (a UpdateAutomaticClusterUpdateSettingRequest) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAutomaticClusterUpdateSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAutomaticClusterUpdateSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAutomaticClusterUpdateSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11324,52 +6675,17 @@ func (a UpdateComplianceSecurityProfileSettingRequest) GetComplexFieldTypes(ctx } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateComplianceSecurityProfileSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateComplianceSecurityProfileSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateComplianceSecurityProfileSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11418,52 +6734,17 @@ func (a UpdateCspEnablementAccountSettingRequest) GetComplexFieldTypes(ctx conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCspEnablementAccountSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCspEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCspEnablementAccountSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11520,52 +6801,17 @@ func (a UpdateDefaultNamespaceSettingRequest) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateDefaultNamespaceSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateDefaultNamespaceSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateDefaultNamespaceSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11614,52 +6860,17 @@ func (a UpdateDisableLegacyAccessRequest) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateDisableLegacyAccessRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyAccessRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyAccessRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11708,52 +6919,17 @@ func (a UpdateDisableLegacyDbfsRequest) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateDisableLegacyDbfsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyDbfsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyDbfsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11802,52 +6978,17 @@ func (a UpdateDisableLegacyFeaturesRequest) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateDisableLegacyFeaturesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateDisableLegacyFeaturesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateDisableLegacyFeaturesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11896,52 +7037,17 @@ func (a UpdateEnhancedSecurityMonitoringSettingRequest) GetComplexFieldTypes(ctx } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateEnhancedSecurityMonitoringSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateEnhancedSecurityMonitoringSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateEnhancedSecurityMonitoringSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -11990,52 +7096,17 @@ func (a UpdateEsmEnablementAccountSettingRequest) GetComplexFieldTypes(ctx conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateEsmEnablementAccountSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateEsmEnablementAccountSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateEsmEnablementAccountSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -12089,52 +7160,19 @@ func (a UpdateIpAccessList) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateIpAccessList{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateIpAccessList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateIpAccessList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12181,52 +7219,17 @@ func (a UpdateNotificationDestinationRequest) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateNotificationDestinationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateNotificationDestinationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateNotificationDestinationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "config": o.Config, + "display_name": o.DisplayName, + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -12275,52 +7278,17 @@ func (a UpdatePersonalComputeSettingRequest) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePersonalComputeSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePersonalComputeSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePersonalComputeSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. @@ -12356,52 +7324,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12444,52 +7373,17 @@ func (a UpdateRestrictWorkspaceAdminsSettingRequest) GetComplexFieldTypes(ctx co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRestrictWorkspaceAdminsSettingRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRestrictWorkspaceAdminsSettingRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRestrictWorkspaceAdminsSettingRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allow_missing": o.AllowMissing, + "field_mask": o.FieldMask, + "setting": o.Setting, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/sharing_tf/model.go b/internal/service/sharing_tf/model.go index 80b2d52bf..f06778b76 100755 --- a/internal/service/sharing_tf/model.go +++ b/internal/service/sharing_tf/model.go @@ -12,17 +12,13 @@ package sharing_tf import ( "context" - "fmt" "reflect" "github.com/databricks/databricks-sdk-go/service/catalog" - 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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type CreateProvider struct { @@ -54,52 +50,18 @@ func (a CreateProvider) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateProvider{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateProvider) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateProvider) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateProvider) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateProvider) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateProvider) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateProvider) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateProvider) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "authentication_type": o.AuthenticationType, + "comment": o.Comment, + "name": o.Name, + "recipient_profile_str": o.RecipientProfileStr, + }) } // Type implements basetypes.ObjectValuable. @@ -159,52 +121,23 @@ func (a CreateRecipient) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRecipient{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRecipient) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRecipient) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRecipient) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRecipient) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRecipient) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRecipient) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRecipient) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -254,52 +187,17 @@ func (a CreateShare) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateShare{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateShare) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateShare) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateShare) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateShare) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateShare) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateShare) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateShare) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "comment": o.Comment, + "name": o.Name, + "storage_root": o.StorageRoot, + }) } // Type implements basetypes.ObjectValuable. @@ -336,52 +234,15 @@ func (a DeleteProviderRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -416,52 +277,15 @@ func (a DeleteRecipientRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRecipientRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRecipientRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRecipientRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -493,52 +317,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -571,52 +356,15 @@ func (a DeleteShareRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteShareRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteShareRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteShareRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteShareRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteShareRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteShareRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteShareRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteShareRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -651,52 +399,15 @@ func (a GetActivationUrlInfoRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetActivationUrlInfoRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetActivationUrlInfoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -728,52 +439,13 @@ func (a GetActivationUrlInfoResponse) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetActivationUrlInfoResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetActivationUrlInfoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetActivationUrlInfoResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -806,52 +478,15 @@ func (a GetProviderRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetProviderRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetProviderRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetProviderRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetProviderRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetProviderRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetProviderRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetProviderRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetProviderRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -886,52 +521,15 @@ func (a GetRecipientRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRecipientRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRecipientRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRecipientRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRecipientRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRecipientRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRecipientRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRecipientRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRecipientRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -971,52 +569,16 @@ func (a GetRecipientSharePermissionsResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRecipientSharePermissionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRecipientSharePermissionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRecipientSharePermissionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "permissions_out": o.PermissionsOut, + }) } // Type implements basetypes.ObjectValuable. @@ -1056,52 +618,16 @@ func (a GetShareRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetShareRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetShareRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetShareRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetShareRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetShareRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetShareRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetShareRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetShareRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "include_shared_data": o.IncludeSharedData, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1138,52 +664,15 @@ func (a IpAccessList) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = IpAccessList{} - -// Equal implements basetypes.ObjectValuable. -func (o IpAccessList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o IpAccessList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o IpAccessList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o IpAccessList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o IpAccessList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o IpAccessList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o IpAccessList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "allowed_ip_addresses": o.AllowedIpAddresses, + }) } // Type implements basetypes.ObjectValuable. @@ -1225,52 +714,16 @@ func (a ListProviderSharesResponse) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProviderSharesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProviderSharesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProviderSharesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shares": o.Shares, + }) } // Type implements basetypes.ObjectValuable. @@ -1321,52 +774,17 @@ func (a ListProvidersRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProvidersRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProvidersRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProvidersRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProvidersRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProvidersRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProvidersRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProvidersRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProvidersRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data_provider_global_metastore_id": o.DataProviderGlobalMetastoreId, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1408,52 +826,16 @@ func (a ListProvidersResponse) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListProvidersResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListProvidersResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListProvidersResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListProvidersResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListProvidersResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListProvidersResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListProvidersResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListProvidersResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "providers": o.Providers, + }) } // Type implements basetypes.ObjectValuable. @@ -1504,52 +886,17 @@ func (a ListRecipientsRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRecipientsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRecipientsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRecipientsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data_recipient_global_metastore_id": o.DataRecipientGlobalMetastoreId, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1591,52 +938,16 @@ func (a ListRecipientsResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListRecipientsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListRecipientsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListRecipientsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "recipients": o.Recipients, + }) } // Type implements basetypes.ObjectValuable. @@ -1686,52 +997,17 @@ func (a ListSharesRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSharesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSharesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSharesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSharesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSharesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSharesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSharesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSharesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1773,52 +1049,16 @@ func (a ListSharesResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSharesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSharesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSharesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSharesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSharesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSharesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSharesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSharesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "shares": o.Shares, + }) } // Type implements basetypes.ObjectValuable. @@ -1857,52 +1097,15 @@ func (a Partition) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Partition{} - -// Equal implements basetypes.ObjectValuable. -func (o Partition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Partition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Partition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Partition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Partition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Partition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Partition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -1948,52 +1151,18 @@ func (a PartitionValue) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PartitionValue{} - -// Equal implements basetypes.ObjectValuable. -func (o PartitionValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PartitionValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PartitionValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PartitionValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PartitionValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PartitionValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PartitionValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "op": o.Op, + "recipient_property_key": o.RecipientPropertyKey, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -2034,52 +1203,16 @@ func (a PrivilegeAssignment) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PrivilegeAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PrivilegeAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PrivilegeAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal": o.Principal, + "privileges": o.Privileges, + }) } // Type implements basetypes.ObjectValuable. @@ -2151,52 +1284,28 @@ func (a ProviderInfo) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProviderInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ProviderInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProviderInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProviderInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProviderInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProviderInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProviderInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProviderInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2245,52 +1354,15 @@ func (a ProviderShare) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ProviderShare{} - -// Equal implements basetypes.ObjectValuable. -func (o ProviderShare) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ProviderShare) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ProviderShare) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ProviderShare) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ProviderShare) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ProviderShare) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ProviderShare) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2371,52 +1443,32 @@ func (a RecipientInfo) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RecipientInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RecipientInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RecipientInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RecipientInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RecipientInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RecipientInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RecipientInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RecipientInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2477,52 +1529,17 @@ func (a RecipientProfile) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RecipientProfile{} - -// Equal implements basetypes.ObjectValuable. -func (o RecipientProfile) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RecipientProfile) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RecipientProfile) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RecipientProfile) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RecipientProfile) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RecipientProfile) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RecipientProfile) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bearer_token": o.BearerToken, + "endpoint": o.Endpoint, + "share_credentials_version": o.ShareCredentialsVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -2571,52 +1588,21 @@ func (a RecipientTokenInfo) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RecipientTokenInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RecipientTokenInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RecipientTokenInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2657,52 +1643,15 @@ func (a RetrieveTokenRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RetrieveTokenRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RetrieveTokenRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RetrieveTokenRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "activation_url": o.ActivationUrl, + }) } // Type implements basetypes.ObjectValuable. @@ -2742,52 +1691,18 @@ func (a RetrieveTokenResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RetrieveTokenResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RetrieveTokenResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RetrieveTokenResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bearerToken": o.BearerToken, + "endpoint": o.Endpoint, + "expirationTime": o.ExpirationTime, + "shareCredentialsVersion": o.ShareCredentialsVersion, + }) } // Type implements basetypes.ObjectValuable. @@ -2829,52 +1744,16 @@ func (a RotateRecipientToken) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RotateRecipientToken{} - -// Equal implements basetypes.ObjectValuable. -func (o RotateRecipientToken) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RotateRecipientToken) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RotateRecipientToken) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RotateRecipientToken) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RotateRecipientToken) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RotateRecipientToken) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RotateRecipientToken) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "existing_token_expire_in_seconds": o.ExistingTokenExpireInSeconds, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -2913,52 +1792,15 @@ func (a SecurablePropertiesKvPairs) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SecurablePropertiesKvPairs{} - -// Equal implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SecurablePropertiesKvPairs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SecurablePropertiesKvPairs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "properties": o.Properties, + }) } // Type implements basetypes.ObjectValuable. @@ -3014,52 +1856,24 @@ func (a ShareInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ShareInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ShareInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ShareInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ShareInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ShareInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ShareInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ShareInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ShareInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3117,52 +1931,17 @@ func (a SharePermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SharePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SharePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SharePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -3202,52 +1981,16 @@ func (a ShareToPrivilegeAssignment) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ShareToPrivilegeAssignment{} - -// Equal implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ShareToPrivilegeAssignment) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ShareToPrivilegeAssignment) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "privilege_assignments": o.PrivilegeAssignments, + "share_name": o.ShareName, + }) } // Type implements basetypes.ObjectValuable. @@ -3331,52 +2074,27 @@ func (a SharedDataObject) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SharedDataObject{} - -// Equal implements basetypes.ObjectValuable. -func (o SharedDataObject) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SharedDataObject) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SharedDataObject) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SharedDataObject) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SharedDataObject) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SharedDataObject) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SharedDataObject) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "added_at": o.AddedAt, + "added_by": o.AddedBy, + "cdf_enabled": o.CdfEnabled, + "comment": o.Comment, + "content": o.Content, + "data_object_type": o.DataObjectType, + "history_data_sharing_status": o.HistoryDataSharingStatus, + "name": o.Name, + "partition": o.Partitions, + "shared_as": o.SharedAs, + "start_version": o.StartVersion, + "status": o.Status, + "string_shared_as": o.StringSharedAs, + }) } // Type implements basetypes.ObjectValuable. @@ -3428,52 +2146,16 @@ func (a SharedDataObjectUpdate) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SharedDataObjectUpdate{} - -// Equal implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SharedDataObjectUpdate) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SharedDataObjectUpdate) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "action": o.Action, + "data_object": o.DataObject, + }) } // Type implements basetypes.ObjectValuable. @@ -3508,52 +2190,13 @@ func (a UpdatePermissionsResponse) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdatePermissionsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdatePermissionsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdatePermissionsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3594,52 +2237,19 @@ func (a UpdateProvider) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateProvider{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateProvider) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateProvider) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateProvider) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateProvider) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateProvider) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateProvider) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateProvider) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3695,52 +2305,21 @@ func (a UpdateRecipient) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRecipient{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRecipient) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRecipient) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRecipient) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRecipient) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRecipient) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRecipient) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRecipient) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3782,52 +2361,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3871,52 +2411,20 @@ func (a UpdateShare) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateShare{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateShare) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateShare) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateShare) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateShare) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateShare) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateShare) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateShare) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3973,52 +2481,18 @@ func (a UpdateSharePermissions) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateSharePermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateSharePermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateSharePermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "changes": o.Changes, + "max_results": o.MaxResults, + "name": o.Name, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/sql_tf/model.go b/internal/service/sql_tf/model.go index 38e572bc3..1688aec95 100755 --- a/internal/service/sql_tf/model.go +++ b/internal/service/sql_tf/model.go @@ -12,15 +12,11 @@ package sql_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AccessControl struct { @@ -49,52 +45,17 @@ func (a AccessControl) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AccessControl{} - -// Equal implements basetypes.ObjectValuable. -func (o AccessControl) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AccessControl) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AccessControl) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AccessControl) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AccessControl) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AccessControl) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AccessControl) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "group_name": o.GroupName, + "permission_level": o.PermissionLevel, + "user_name": o.UserName, + }) } // Type implements basetypes.ObjectValuable. @@ -173,52 +134,29 @@ func (a Alert) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Alert{} - -// Equal implements basetypes.ObjectValuable. -func (o Alert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Alert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Alert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Alert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Alert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Alert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Alert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -278,52 +216,18 @@ func (a AlertCondition) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertCondition{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertCondition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertCondition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertCondition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertCondition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertCondition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertCondition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertCondition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "empty_result_state": o.EmptyResultState, + "op": o.Op, + "operand": o.Operand, + "threshold": o.Threshold, + }) } // Type implements basetypes.ObjectValuable. @@ -365,52 +269,15 @@ func (a AlertConditionOperand) GetComplexFieldTypes(ctx context.Context) map[str } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertConditionOperand{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertConditionOperand) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertConditionOperand) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertConditionOperand) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertConditionOperand) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertConditionOperand) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertConditionOperand) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertConditionOperand) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "column": o.Column, + }) } // Type implements basetypes.ObjectValuable. @@ -447,52 +314,15 @@ func (a AlertConditionThreshold) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertConditionThreshold{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertConditionThreshold) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertConditionThreshold) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -527,52 +357,15 @@ func (a AlertOperandColumn) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertOperandColumn{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertOperandColumn) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertOperandColumn) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertOperandColumn) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertOperandColumn) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertOperandColumn) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertOperandColumn) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertOperandColumn) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -609,52 +402,17 @@ func (a AlertOperandValue) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertOperandValue{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertOperandValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertOperandValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertOperandValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertOperandValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertOperandValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertOperandValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertOperandValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bool_value": o.BoolValue, + "double_value": o.DoubleValue, + "string_value": o.StringValue, + }) } // Type implements basetypes.ObjectValuable. @@ -693,7 +451,7 @@ type AlertOptions struct { 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 any `tfsdk:"value" tf:""` + Value types.Object `tfsdk:"value" tf:""` } func (newState *AlertOptions) SyncEffectiveFieldsDuringCreateOrUpdate(plan AlertOptions) { @@ -713,52 +471,21 @@ func (a AlertOptions) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -838,52 +565,27 @@ func (a AlertQuery) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AlertQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o AlertQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AlertQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AlertQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AlertQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AlertQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AlertQuery) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AlertQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -943,52 +645,18 @@ func (a BaseChunkInfo) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = BaseChunkInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o BaseChunkInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o BaseChunkInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o BaseChunkInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o BaseChunkInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o BaseChunkInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o BaseChunkInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o BaseChunkInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "byte_count": o.ByteCount, + "chunk_index": o.ChunkIndex, + "row_count": o.RowCount, + "row_offset": o.RowOffset, + }) } // Type implements basetypes.ObjectValuable. @@ -1027,52 +695,15 @@ func (a CancelExecutionRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelExecutionRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelExecutionRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelExecutionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "statement_id": o.StatementId, + }) } // Type implements basetypes.ObjectValuable. @@ -1104,52 +735,13 @@ func (a CancelExecutionResponse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CancelExecutionResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CancelExecutionResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CancelExecutionResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1184,52 +776,16 @@ func (a Channel) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Channel{} - -// Equal implements basetypes.ObjectValuable. -func (o Channel) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Channel) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Channel) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Channel) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Channel) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Channel) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Channel) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dbsql_version": o.DbsqlVersion, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1267,52 +823,16 @@ func (a ChannelInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ChannelInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ChannelInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ChannelInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ChannelInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ChannelInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ChannelInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ChannelInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ChannelInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dbsql_version": o.DbsqlVersion, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1362,52 +882,21 @@ func (a ColumnInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ColumnInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ColumnInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ColumnInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ColumnInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ColumnInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1459,52 +948,19 @@ func (a CreateAlert) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "options": o.Options, + "parent": o.Parent, + "query_id": o.QueryId, + "rearm": o.Rearm, + }) } // Type implements basetypes.ObjectValuable. @@ -1545,52 +1001,15 @@ func (a CreateAlertRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAlertRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAlertRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAlertRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAlertRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAlertRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAlertRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAlertRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert": o.Alert, + }) } // Type implements basetypes.ObjectValuable. @@ -1651,52 +1070,22 @@ func (a CreateAlertRequestAlert) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateAlertRequestAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateAlertRequestAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateAlertRequestAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1740,52 +1129,15 @@ func (a CreateQueryRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateQueryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query": o.Query, + }) } // Type implements basetypes.ObjectValuable. @@ -1846,52 +1198,25 @@ func (a CreateQueryRequestQuery) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateQueryRequestQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateQueryRequestQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateQueryRequestQuery) 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. @@ -1928,7 +1253,7 @@ type CreateQueryVisualizationsLegacyRequest struct { // 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 any `tfsdk:"options" tf:""` + 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. @@ -1952,52 +1277,19 @@ func (a CreateQueryVisualizationsLegacyRequest) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateQueryVisualizationsLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateQueryVisualizationsLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateQueryVisualizationsLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "name": o.Name, + "options": o.Options, + "query_id": o.QueryId, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -2036,52 +1328,15 @@ func (a CreateVisualizationRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVisualizationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVisualizationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVisualizationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "visualization": o.Visualization, + }) } // Type implements basetypes.ObjectValuable. @@ -2129,52 +1384,19 @@ func (a CreateVisualizationRequestVisualization) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVisualizationRequestVisualization{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVisualizationRequestVisualization) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVisualizationRequestVisualization) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2274,52 +1496,27 @@ func (a CreateWarehouseRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateWarehouseRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateWarehouseRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2369,52 +1566,15 @@ func (a CreateWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -2462,52 +1622,20 @@ func (a CreateWidget) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateWidget{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateWidget) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateWidget) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateWidget) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateWidget) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateWidget) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateWidget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateWidget) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2597,52 +1725,31 @@ func (a Dashboard) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Dashboard{} - -// Equal implements basetypes.ObjectValuable. -func (o Dashboard) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Dashboard) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Dashboard) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Dashboard) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Dashboard) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Dashboard) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Dashboard) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2710,52 +1817,18 @@ func (a DashboardEditContent) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DashboardEditContent{} - -// Equal implements basetypes.ObjectValuable. -func (o DashboardEditContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DashboardEditContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DashboardEditContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DashboardEditContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DashboardEditContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DashboardEditContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DashboardEditContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + "name": o.Name, + "run_as_role": o.RunAsRole, + "tags": o.Tags, + }) } // Type implements basetypes.ObjectValuable. @@ -2796,52 +1869,15 @@ func (a DashboardOptions) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DashboardOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o DashboardOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DashboardOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DashboardOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DashboardOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DashboardOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DashboardOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DashboardOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "moved_to_trash_at": o.MovedToTrashAt, + }) } // Type implements basetypes.ObjectValuable. @@ -2891,52 +1927,20 @@ func (a DashboardPostContent) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DashboardPostContent{} - -// Equal implements basetypes.ObjectValuable. -func (o DashboardPostContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DashboardPostContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DashboardPostContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DashboardPostContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DashboardPostContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DashboardPostContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DashboardPostContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3000,52 +2004,23 @@ func (a DataSource) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DataSource{} - -// Equal implements basetypes.ObjectValuable. -func (o DataSource) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DataSource) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DataSource) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DataSource) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DataSource) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DataSource) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DataSource) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3088,52 +2063,16 @@ func (a DateRange) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DateRange{} - -// Equal implements basetypes.ObjectValuable. -func (o DateRange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DateRange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DateRange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DateRange) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DateRange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DateRange) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DateRange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "end": o.End, + "start": o.Start, + }) } // Type implements basetypes.ObjectValuable. @@ -3177,52 +2116,18 @@ func (a DateRangeValue) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DateRangeValue{} - -// Equal implements basetypes.ObjectValuable. -func (o DateRangeValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DateRangeValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DateRangeValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DateRangeValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DateRangeValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DateRangeValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DateRangeValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3266,52 +2171,17 @@ func (a DateValue) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DateValue{} - -// Equal implements basetypes.ObjectValuable. -func (o DateValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DateValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DateValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DateValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DateValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DateValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DateValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "date_value": o.DateValue, + "dynamic_date_value": o.DynamicDateValue, + "precision": o.Precision, + }) } // Type implements basetypes.ObjectValuable. @@ -3347,52 +2217,15 @@ func (a DeleteAlertsLegacyRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAlertsLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAlertsLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAlertsLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert_id": o.AlertId, + }) } // Type implements basetypes.ObjectValuable. @@ -3426,52 +2259,15 @@ func (a DeleteDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -3506,52 +2302,15 @@ func (a DeleteDashboardWidgetRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDashboardWidgetRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDashboardWidgetRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDashboardWidgetRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3585,52 +2344,15 @@ func (a DeleteQueriesLegacyRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteQueriesLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteQueriesLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteQueriesLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query_id": o.QueryId, + }) } // Type implements basetypes.ObjectValuable. @@ -3665,52 +2387,15 @@ func (a DeleteQueryVisualizationsLegacyRequest) GetComplexFieldTypes(ctx context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteQueryVisualizationsLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteQueryVisualizationsLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteQueryVisualizationsLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3742,52 +2427,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( + o.Type(ctx).(basetypes.ObjectType).AttrTypes, + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3819,52 +2465,15 @@ func (a DeleteVisualizationRequest) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteVisualizationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteVisualizationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteVisualizationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3899,52 +2508,15 @@ func (a DeleteWarehouseRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWarehouseRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWarehouseRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -3976,52 +2548,13 @@ func (a DeleteWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4064,52 +2597,19 @@ func (a EditAlert) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o EditAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4211,52 +2711,28 @@ func (a EditWarehouseRequest) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditWarehouseRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditWarehouseRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4305,52 +2781,13 @@ func (a EditWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EditWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EditWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EditWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4382,52 +2819,13 @@ func (a Empty) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Empty{} - -// Equal implements basetypes.ObjectValuable. -func (o Empty) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Empty) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Empty) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Empty) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Empty) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Empty) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Empty) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4460,52 +2858,16 @@ func (a EndpointConfPair) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointConfPair{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointConfPair) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointConfPair) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointConfPair) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointConfPair) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointConfPair) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointConfPair) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointConfPair) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -4552,52 +2914,19 @@ func (a EndpointHealth) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointHealth{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointHealth) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointHealth) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointHealth) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointHealth) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointHealth) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointHealth) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointHealth) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "details": o.Details, + "failure_reason": o.FailureReason, + "message": o.Message, + "status": o.Status, + "summary": o.Summary, + }) } // Type implements basetypes.ObjectValuable. @@ -4714,52 +3043,34 @@ func (a EndpointInfo) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointInfo) 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. @@ -4821,52 +3132,16 @@ func (a EndpointTagPair) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointTagPair{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointTagPair) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointTagPair) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointTagPair) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointTagPair) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointTagPair) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointTagPair) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointTagPair) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -4902,52 +3177,15 @@ func (a EndpointTags) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointTags{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointTags) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointTags) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointTags) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointTags) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointTags) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointTags) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointTags) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "custom_tags": o.CustomTags, + }) } // Type implements basetypes.ObjectValuable. @@ -4990,52 +3228,17 @@ func (a EnumValue) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EnumValue{} - -// Equal implements basetypes.ObjectValuable. -func (o EnumValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EnumValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EnumValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EnumValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EnumValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EnumValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EnumValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enum_options": o.EnumOptions, + "multi_values_options": o.MultiValuesOptions, + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -5198,52 +3401,25 @@ func (a ExecuteStatementRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExecuteStatementRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExecuteStatementRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExecuteStatementRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5319,52 +3495,23 @@ func (a ExternalLink) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExternalLink{} - -// Equal implements basetypes.ObjectValuable. -func (o ExternalLink) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExternalLink) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExternalLink) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExternalLink) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExternalLink) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExternalLink) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExternalLink) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5408,52 +3555,15 @@ func (a GetAlertRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAlertRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAlertRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAlertRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAlertRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAlertRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAlertRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAlertRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -5487,52 +3597,15 @@ func (a GetAlertsLegacyRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAlertsLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAlertsLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAlertsLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert_id": o.AlertId, + }) } // Type implements basetypes.ObjectValuable. @@ -5566,52 +3639,15 @@ func (a GetDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -5648,61 +3684,25 @@ func (a GetDbsqlPermissionRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetDbsqlPermissionRequest{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetDbsqlPermissionRequest) 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, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o GetDbsqlPermissionRequest) Type(ctx context.Context) attr.Type { - return types.ObjectType{ - AttrTypes: map[string]attr.Type{ - "objectId": types.StringType, - "objectType": types.StringType, - }, +// Type implements basetypes.ObjectValuable. +func (o GetDbsqlPermissionRequest) Type(ctx context.Context) attr.Type { + return types.ObjectType{ + AttrTypes: map[string]attr.Type{ + "objectId": types.StringType, + "objectType": types.StringType, + }, } } @@ -5728,52 +3728,15 @@ func (a GetQueriesLegacyRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetQueriesLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetQueriesLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetQueriesLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query_id": o.QueryId, + }) } // Type implements basetypes.ObjectValuable. @@ -5807,52 +3770,15 @@ func (a GetQueryRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetQueryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -5891,52 +3817,17 @@ func (a GetResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -5976,52 +3867,15 @@ func (a GetStatementRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStatementRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStatementRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStatementRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStatementRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStatementRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStatementRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStatementRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStatementRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "statement_id": o.StatementId, + }) } // Type implements basetypes.ObjectValuable. @@ -6058,52 +3912,16 @@ func (a GetStatementResultChunkNRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStatementResultChunkNRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStatementResultChunkNRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStatementResultChunkNRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "chunk_index": o.ChunkIndex, + "statement_id": o.StatementId, + }) } // Type implements basetypes.ObjectValuable. @@ -6139,52 +3957,15 @@ func (a GetWarehousePermissionLevelsRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWarehousePermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -6220,52 +4001,15 @@ func (a GetWarehousePermissionLevelsResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWarehousePermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -6302,52 +4046,15 @@ func (a GetWarehousePermissionsRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWarehousePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWarehousePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWarehousePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -6382,52 +4089,15 @@ func (a GetWarehouseRequest) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWarehouseRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWarehouseRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWarehouseRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -6538,52 +4208,34 @@ func (a GetWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWarehouseResponse) 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. @@ -6674,52 +4326,23 @@ func (a GetWorkspaceWarehouseConfigResponse) GetComplexFieldTypes(ctx context.Co } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceWarehouseConfigResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceWarehouseConfigResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceWarehouseConfigResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6801,52 +4424,25 @@ func (a LegacyAlert) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LegacyAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o LegacyAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LegacyAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LegacyAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LegacyAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LegacyAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LegacyAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LegacyAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6968,52 +4564,38 @@ func (a LegacyQuery) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LegacyQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o LegacyQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LegacyQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LegacyQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LegacyQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LegacyQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LegacyQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LegacyQuery) 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. @@ -7076,7 +4658,7 @@ type LegacyVisualization struct { // 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 any `tfsdk:"options" tf:"optional"` + 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. @@ -7104,52 +4686,22 @@ func (a LegacyVisualization) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = LegacyVisualization{} - -// Equal implements basetypes.ObjectValuable. -func (o LegacyVisualization) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o LegacyVisualization) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o LegacyVisualization) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o LegacyVisualization) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o LegacyVisualization) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o LegacyVisualization) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o LegacyVisualization) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7194,52 +4746,16 @@ func (a ListAlertsRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAlertsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAlertsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAlertsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAlertsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAlertsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAlertsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAlertsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAlertsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7277,52 +4793,16 @@ func (a ListAlertsResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAlertsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAlertsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAlertsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAlertsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAlertsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAlertsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAlertsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAlertsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -7400,52 +4880,28 @@ func (a ListAlertsResponseAlert) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAlertsResponseAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAlertsResponseAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAlertsResponseAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -7501,63 +4957,29 @@ func (a ListDashboardsRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListDashboardsRequest{} +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListDashboardsRequest) 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, + }) +} -// Equal implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) -} - -// Type implements basetypes.ObjectValuable. -func (o ListDashboardsRequest) 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, - }, +// Type implements basetypes.ObjectValuable. +func (o ListDashboardsRequest) 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, + }, } } @@ -7603,52 +5025,18 @@ func (a ListQueriesLegacyRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueriesLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueriesLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueriesLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "order": o.Order, + "page": o.Page, + "page_size": o.PageSize, + "q": o.Q, + }) } // Type implements basetypes.ObjectValuable. @@ -7687,52 +5075,16 @@ func (a ListQueriesRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueriesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueriesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueriesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueriesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueriesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueriesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueriesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueriesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7773,52 +5125,17 @@ func (a ListQueriesResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueriesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueriesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueriesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueriesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueriesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueriesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueriesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueriesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "has_next_page": o.HasNextPage, + "next_page_token": o.NextPageToken, + "res": o.Res, + }) } // Type implements basetypes.ObjectValuable. @@ -7870,52 +5187,18 @@ func (a ListQueryHistoryRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueryHistoryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueryHistoryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueryHistoryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "filter_by": o.FilterBy, + "include_metrics": o.IncludeMetrics, + "max_results": o.MaxResults, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -7957,52 +5240,16 @@ func (a ListQueryObjectsResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueryObjectsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueryObjectsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -8074,52 +5321,30 @@ func (a ListQueryObjectsResponseQuery) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListQueryObjectsResponseQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListQueryObjectsResponseQuery) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListQueryObjectsResponseQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8180,52 +5405,18 @@ func (a ListResponse) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "count": o.Count, + "page": o.Page, + "page_size": o.PageSize, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -8268,52 +5459,17 @@ func (a ListVisualizationsForQueryRequest) GetComplexFieldTypes(ctx context.Cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListVisualizationsForQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListVisualizationsForQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "page_size": o.PageSize, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -8352,52 +5508,16 @@ func (a ListVisualizationsForQueryResponse) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListVisualizationsForQueryResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListVisualizationsForQueryResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListVisualizationsForQueryResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -8436,52 +5556,15 @@ func (a ListWarehousesRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListWarehousesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListWarehousesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListWarehousesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "run_as_user_id": o.RunAsUserId, + }) } // Type implements basetypes.ObjectValuable. @@ -8517,52 +5600,15 @@ func (a ListWarehousesResponse) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListWarehousesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListWarehousesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListWarehousesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "warehouses": o.Warehouses, + }) } // Type implements basetypes.ObjectValuable. @@ -8603,52 +5649,17 @@ func (a MultiValuesOptions) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MultiValuesOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o MultiValuesOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MultiValuesOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MultiValuesOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MultiValuesOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MultiValuesOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MultiValuesOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MultiValuesOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "prefix": o.Prefix, + "separator": o.Separator, + "suffix": o.Suffix, + }) } // Type implements basetypes.ObjectValuable. @@ -8683,52 +5694,15 @@ func (a NumericValue) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = NumericValue{} - -// Equal implements basetypes.ObjectValuable. -func (o NumericValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o NumericValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o NumericValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o NumericValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o NumericValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o NumericValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o NumericValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -8767,52 +5741,18 @@ func (a OdbcParams) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = OdbcParams{} - -// Equal implements basetypes.ObjectValuable. -func (o OdbcParams) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o OdbcParams) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o OdbcParams) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o OdbcParams) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o OdbcParams) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o OdbcParams) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o OdbcParams) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "hostname": o.Hostname, + "path": o.Path, + "port": o.Port, + "protocol": o.Protocol, + }) } // Type implements basetypes.ObjectValuable. @@ -8845,7 +5785,7 @@ type Parameter struct { // Parameters can have several different types. Type_ types.String `tfsdk:"type" tf:"optional"` // The default value for this parameter. - Value any `tfsdk:"value" tf:"optional"` + Value types.Object `tfsdk:"value" tf:"optional"` } func (newState *Parameter) SyncEffectiveFieldsDuringCreateOrUpdate(plan Parameter) { @@ -8867,52 +5807,21 @@ func (a Parameter) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Parameter{} - -// Equal implements basetypes.ObjectValuable. -func (o Parameter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Parameter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Parameter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Parameter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Parameter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Parameter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Parameter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -8991,52 +5900,31 @@ func (a Query) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Query{} - -// Equal implements basetypes.ObjectValuable. -func (o Query) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Query) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Query) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Query) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Query) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Query) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Query) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9097,52 +5985,17 @@ func (a QueryBackedValue) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryBackedValue{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryBackedValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryBackedValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryBackedValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryBackedValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryBackedValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryBackedValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryBackedValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "multi_values_options": o.MultiValuesOptions, + "query_id": o.QueryId, + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -9175,7 +6028,7 @@ type QueryEditContent struct { // 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 any `tfsdk:"options" tf:"optional"` + Options types.Object `tfsdk:"options" tf:"optional"` // The text of the query to be run. Query types.String `tfsdk:"query" tf:"optional"` @@ -9207,52 +6060,22 @@ func (a QueryEditContent) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryEditContent{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryEditContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryEditContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryEditContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryEditContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryEditContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryEditContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryEditContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9310,52 +6133,19 @@ func (a QueryFilter) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryFilter{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryFilter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryFilter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryFilter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryFilter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryFilter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryFilter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryFilter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -9453,52 +6243,36 @@ func (a QueryInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryInfo) 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. @@ -9565,52 +6339,18 @@ func (a QueryList) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryList{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryList) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryList) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryList) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryList) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryList) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryList) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryList) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "count": o.Count, + "page": o.Page, + "page_size": o.PageSize, + "results": o.Results, + }) } // Type implements basetypes.ObjectValuable. @@ -9705,52 +6445,36 @@ func (a QueryMetrics) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryMetrics{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryMetrics) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryMetrics) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryMetrics) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryMetrics) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryMetrics) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, - o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryMetrics) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryMetrics) 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. @@ -9815,52 +6539,18 @@ func (a QueryOptions) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "catalog": o.Catalog, + "moved_to_trash_at": o.MovedToTrashAt, + "parameters": o.Parameters, + "schema": o.Schema, + }) } // Type implements basetypes.ObjectValuable. @@ -9923,52 +6613,22 @@ func (a QueryParameter) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryParameter{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryParameter) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryParameter) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryParameter) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryParameter) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryParameter) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryParameter) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryParameter) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10014,7 +6674,7 @@ type QueryPostContent struct { // 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 any `tfsdk:"options" tf:"optional"` + 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. @@ -10046,52 +6706,22 @@ func (a QueryPostContent) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryPostContent{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryPostContent) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryPostContent) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryPostContent) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryPostContent) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryPostContent) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryPostContent) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryPostContent) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10139,52 +6769,16 @@ func (a RepeatedEndpointConfPairs) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepeatedEndpointConfPairs{} - -// Equal implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepeatedEndpointConfPairs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepeatedEndpointConfPairs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "config_pair": o.ConfigPair, + "configuration_pairs": o.ConfigurationPairs, + }) } // Type implements basetypes.ObjectValuable. @@ -10223,52 +6817,15 @@ func (a RestoreDashboardRequest) GetComplexFieldTypes(ctx context.Context) map[s return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreDashboardRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreDashboardRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreDashboardRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dashboard_id": o.DashboardId, + }) } // Type implements basetypes.ObjectValuable. @@ -10302,52 +6859,15 @@ func (a RestoreQueriesLegacyRequest) GetComplexFieldTypes(ctx context.Context) m return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreQueriesLegacyRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreQueriesLegacyRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreQueriesLegacyRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "query_id": o.QueryId, + }) } // Type implements basetypes.ObjectValuable. @@ -10379,52 +6899,13 @@ func (a RestoreResponse) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RestoreResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RestoreResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RestoreResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RestoreResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RestoreResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RestoreResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RestoreResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RestoreResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -10481,52 +6962,22 @@ func (a ResultData) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResultData{} - -// Equal implements basetypes.ObjectValuable. -func (o ResultData) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResultData) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResultData) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResultData) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResultData) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResultData) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResultData) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10591,52 +7042,21 @@ func (a ResultManifest) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResultManifest{} - -// Equal implements basetypes.ObjectValuable. -func (o ResultManifest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResultManifest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResultManifest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResultManifest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResultManifest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResultManifest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResultManifest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -10684,52 +7104,16 @@ func (a ResultSchema) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResultSchema{} - -// Equal implements basetypes.ObjectValuable. -func (o ResultSchema) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResultSchema) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResultSchema) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResultSchema) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResultSchema) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResultSchema) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResultSchema) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "column_count": o.ColumnCount, + "columns": o.Columns, + }) } // Type implements basetypes.ObjectValuable. @@ -10767,52 +7151,16 @@ func (a ServiceError) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ServiceError{} - -// Equal implements basetypes.ObjectValuable. -func (o ServiceError) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ServiceError) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ServiceError) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ServiceError) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ServiceError) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ServiceError) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ServiceError) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error_code": o.ErrorCode, + "message": o.Message, + }) } // Type implements basetypes.ObjectValuable. @@ -10854,52 +7202,17 @@ func (a SetRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SetRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "objectId": o.ObjectId, + "objectType": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -10942,52 +7255,17 @@ func (a SetResponse) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -11055,52 +7333,23 @@ func (a SetWorkspaceWarehouseConfigRequest) GetComplexFieldTypes(ctx context.Con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetWorkspaceWarehouseConfigRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetWorkspaceWarehouseConfigRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -11152,52 +7401,13 @@ func (a SetWorkspaceWarehouseConfigResponse) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SetWorkspaceWarehouseConfigResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SetWorkspaceWarehouseConfigResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SetWorkspaceWarehouseConfigResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -11230,52 +7440,15 @@ func (a StartRequest) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o StartRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -11307,52 +7480,13 @@ func (a StartWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StartWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StartWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StartWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -11395,52 +7529,17 @@ func (a StatementParameterListItem) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StatementParameterListItem{} - -// Equal implements basetypes.ObjectValuable. -func (o StatementParameterListItem) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StatementParameterListItem) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StatementParameterListItem) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StatementParameterListItem) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StatementParameterListItem) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StatementParameterListItem) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StatementParameterListItem) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + "type": o.Type_, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -11488,52 +7587,18 @@ func (a StatementResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StatementResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StatementResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StatementResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StatementResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StatementResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StatementResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StatementResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StatementResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "manifest": o.Manifest, + "result": o.Result, + "statement_id": o.StatementId, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -11587,52 +7652,16 @@ func (a StatementStatus) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StatementStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o StatementStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StatementStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StatementStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StatementStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StatementStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StatementStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StatementStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "error": o.Error, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -11670,52 +7699,15 @@ func (a StopRequest) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StopRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o StopRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StopRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StopRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StopRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StopRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StopRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StopRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -11747,52 +7739,13 @@ func (a StopWarehouseResponse) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = StopWarehouseResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o StopWarehouseResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o StopWarehouseResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -11823,52 +7776,15 @@ func (a Success) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Success{} - -// Equal implements basetypes.ObjectValuable. -func (o Success) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Success) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Success) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Success) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Success) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Success) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Success) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + }) } // Type implements basetypes.ObjectValuable. @@ -11909,52 +7825,17 @@ func (a TerminationReason) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TerminationReason{} - -// Equal implements basetypes.ObjectValuable. -func (o TerminationReason) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TerminationReason) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TerminationReason) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TerminationReason) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TerminationReason) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TerminationReason) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TerminationReason) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "code": o.Code, + "parameters": o.Parameters, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -11991,52 +7872,15 @@ func (a TextValue) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TextValue{} - -// Equal implements basetypes.ObjectValuable. -func (o TextValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TextValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TextValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TextValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TextValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TextValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TextValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -12072,52 +7916,16 @@ func (a TimeRange) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TimeRange{} - -// Equal implements basetypes.ObjectValuable. -func (o TimeRange) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TimeRange) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TimeRange) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TimeRange) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TimeRange) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TimeRange) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TimeRange) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "end_time_ms": o.EndTimeMs, + "start_time_ms": o.StartTimeMs, + }) } // Type implements basetypes.ObjectValuable. @@ -12152,52 +7960,15 @@ func (a TransferOwnershipObjectId) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TransferOwnershipObjectId{} - -// Equal implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TransferOwnershipObjectId) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TransferOwnershipObjectId) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "new_owner": o.NewOwner, + }) } // Type implements basetypes.ObjectValuable. @@ -12238,52 +8009,17 @@ func (a TransferOwnershipRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TransferOwnershipRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TransferOwnershipRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TransferOwnershipRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "new_owner": o.NewOwner, + "objectId": o.ObjectId, + "objectType": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -12321,52 +8057,15 @@ func (a TrashAlertRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TrashAlertRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TrashAlertRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TrashAlertRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TrashAlertRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TrashAlertRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o TrashAlertRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TrashAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TrashAlertRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -12392,60 +8091,23 @@ func (newState *TrashQueryRequest) SyncEffectiveFieldsDuringRead(existingState T // 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = TrashQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o TrashQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o TrashQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o TrashQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o TrashQueryRequest) String() string { - return fmt.Sprintf("%#v", o) +// retrieve the type information of the elements in complex fields at runtime. The values of the map +// are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o TrashQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o TrashQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o TrashQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + }) } // Type implements basetypes.ObjectValuable. @@ -12487,52 +8149,17 @@ func (a UpdateAlertRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAlertRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAlertRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAlertRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "alert": o.Alert, + "id": o.Id, + "update_mask": o.UpdateMask, + }) } // Type implements basetypes.ObjectValuable. @@ -12596,52 +8223,22 @@ func (a UpdateAlertRequestAlert) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateAlertRequestAlert{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateAlertRequestAlert) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateAlertRequestAlert) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12692,52 +8289,17 @@ func (a UpdateQueryRequest) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateQueryRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateQueryRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateQueryRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "query": o.Query, + "update_mask": o.UpdateMask, + }) } // Type implements basetypes.ObjectValuable. @@ -12800,52 +8362,25 @@ func (a UpdateQueryRequestQuery) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateQueryRequestQuery{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateQueryRequestQuery) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateQueryRequestQuery) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -12891,52 +8426,13 @@ func (a UpdateResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -12976,52 +8472,17 @@ func (a UpdateVisualizationRequest) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateVisualizationRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateVisualizationRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "update_mask": o.UpdateMask, + "visualization": o.Visualization, + }) } // Type implements basetypes.ObjectValuable. @@ -13069,52 +8530,18 @@ func (a UpdateVisualizationRequestVisualization) GetComplexFieldTypes(ctx contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateVisualizationRequestVisualization{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateVisualizationRequestVisualization) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateVisualizationRequestVisualization) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "display_name": o.DisplayName, + "serialized_options": o.SerializedOptions, + "serialized_query_plan": o.SerializedQueryPlan, + "type": o.Type_, + }) } // Type implements basetypes.ObjectValuable. @@ -13154,52 +8581,17 @@ func (a User) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = User{} - -// Equal implements basetypes.ObjectValuable. -func (o User) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o User) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o User) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o User) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o User) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o User) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o User) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "email": o.Email, + "id": o.Id, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -13253,52 +8645,22 @@ func (a Visualization) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Visualization{} - -// Equal implements basetypes.ObjectValuable. -func (o Visualization) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Visualization) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Visualization) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Visualization) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Visualization) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Visualization) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Visualization) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13345,52 +8707,18 @@ func (a WarehouseAccessControlRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehouseAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehouseAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehouseAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13437,52 +8765,19 @@ func (a WarehouseAccessControlResponse) GetComplexFieldTypes(ctx context.Context } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehouseAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehouseAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehouseAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -13527,52 +8822,17 @@ func (a WarehousePermission) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehousePermission{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehousePermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehousePermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehousePermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehousePermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehousePermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehousePermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehousePermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -13615,52 +8875,17 @@ func (a WarehousePermissions) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehousePermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehousePermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehousePermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehousePermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehousePermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehousePermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehousePermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -13699,52 +8924,16 @@ func (a WarehousePermissionsDescription) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehousePermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehousePermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -13782,52 +8971,16 @@ func (a WarehousePermissionsRequest) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehousePermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehousePermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehousePermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "warehouse_id": o.WarehouseId, + }) } // Type implements basetypes.ObjectValuable. @@ -13867,52 +9020,16 @@ func (a WarehouseTypePair) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WarehouseTypePair{} - -// Equal implements basetypes.ObjectValuable. -func (o WarehouseTypePair) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WarehouseTypePair) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WarehouseTypePair) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WarehouseTypePair) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WarehouseTypePair) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WarehouseTypePair) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WarehouseTypePair) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "enabled": o.Enabled, + "warehouse_type": o.WarehouseType, + }) } // Type implements basetypes.ObjectValuable. @@ -13960,52 +9077,18 @@ func (a Widget) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Widget{} - -// Equal implements basetypes.ObjectValuable. -func (o Widget) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Widget) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Widget) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Widget) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Widget) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Widget) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Widget) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "id": o.Id, + "options": o.Options, + "visualization": o.Visualization, + "width": o.Width, + }) } // Type implements basetypes.ObjectValuable. @@ -14034,7 +9117,7 @@ type WidgetOptions struct { // 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 any `tfsdk:"parameterMappings" tf:"optional"` + 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"` @@ -14063,52 +9146,21 @@ func (a WidgetOptions) GetComplexFieldTypes(ctx context.Context) map[string]refl } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WidgetOptions{} - -// Equal implements basetypes.ObjectValuable. -func (o WidgetOptions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WidgetOptions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WidgetOptions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WidgetOptions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WidgetOptions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WidgetOptions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WidgetOptions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -14160,52 +9212,19 @@ func (a WidgetPosition) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WidgetPosition{} - -// Equal implements basetypes.ObjectValuable. -func (o WidgetPosition) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WidgetPosition) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WidgetPosition) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WidgetPosition) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WidgetPosition) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WidgetPosition) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WidgetPosition) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "autoHeight": o.AutoHeight, + "col": o.Col, + "row": o.Row, + "sizeX": o.SizeX, + "sizeY": o.SizeY, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/vectorsearch_tf/model.go b/internal/service/vectorsearch_tf/model.go index 27bbb022b..20b03299a 100755 --- a/internal/service/vectorsearch_tf/model.go +++ b/internal/service/vectorsearch_tf/model.go @@ -12,15 +12,11 @@ package vectorsearch_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type ColumnInfo struct { @@ -45,52 +41,15 @@ func (a ColumnInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ColumnInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ColumnInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ColumnInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ColumnInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ColumnInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ColumnInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ColumnInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -126,52 +85,16 @@ func (a CreateEndpoint) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateEndpoint{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateEndpoint) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateEndpoint) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateEndpoint) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateEndpoint) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateEndpoint) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateEndpoint) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateEndpoint) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoint_type": o.EndpointType, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -227,52 +150,20 @@ func (a CreateVectorIndexRequest) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVectorIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVectorIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -316,52 +207,15 @@ func (a CreateVectorIndexResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateVectorIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateVectorIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "vector_index": o.VectorIndex, + }) } // Type implements basetypes.ObjectValuable. @@ -402,52 +256,16 @@ func (a DeleteDataResult) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDataResult{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDataResult) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDataResult) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDataResult) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDataResult) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDataResult) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDataResult) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDataResult) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "failed_primary_keys": o.FailedPrimaryKeys, + "success_row_count": o.SuccessRowCount, + }) } // Type implements basetypes.ObjectValuable. @@ -490,52 +308,16 @@ func (a DeleteDataVectorIndexRequest) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDataVectorIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDataVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + "primary_keys": o.PrimaryKeys, + }) } // Type implements basetypes.ObjectValuable. @@ -577,52 +359,16 @@ func (a DeleteDataVectorIndexResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteDataVectorIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteDataVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteDataVectorIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "result": o.Result, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -660,52 +406,15 @@ func (a DeleteEndpointRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + }) } // Type implements basetypes.ObjectValuable. @@ -737,52 +446,13 @@ func (a DeleteEndpointResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteEndpointResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteEndpointResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteEndpointResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -815,52 +485,15 @@ func (a DeleteIndexRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + }) } // Type implements basetypes.ObjectValuable. @@ -892,52 +525,13 @@ func (a DeleteIndexResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -996,52 +590,20 @@ func (a DeltaSyncVectorIndexSpecRequest) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeltaSyncVectorIndexSpecRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeltaSyncVectorIndexSpecRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1107,52 +669,20 @@ func (a DeltaSyncVectorIndexSpecResponse) GetComplexFieldTypes(ctx context.Conte } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeltaSyncVectorIndexSpecResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeltaSyncVectorIndexSpecResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeltaSyncVectorIndexSpecResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1207,52 +737,17 @@ func (a DirectAccessVectorIndexSpec) GetComplexFieldTypes(ctx context.Context) m } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DirectAccessVectorIndexSpec{} - -// Equal implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DirectAccessVectorIndexSpec) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DirectAccessVectorIndexSpec) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "embedding_source_columns": o.EmbeddingSourceColumns, + "embedding_vector_columns": o.EmbeddingVectorColumns, + "schema_json": o.SchemaJson, + }) } // Type implements basetypes.ObjectValuable. @@ -1294,52 +789,16 @@ func (a EmbeddingSourceColumn) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EmbeddingSourceColumn{} - -// Equal implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EmbeddingSourceColumn) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EmbeddingSourceColumn) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "embedding_model_endpoint_name": o.EmbeddingModelEndpointName, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1376,52 +835,16 @@ func (a EmbeddingVectorColumn) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EmbeddingVectorColumn{} - -// Equal implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EmbeddingVectorColumn) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EmbeddingVectorColumn) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "embedding_dimension": o.EmbeddingDimension, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -1474,52 +897,23 @@ func (a EndpointInfo) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -1566,52 +960,16 @@ func (a EndpointStatus) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = EndpointStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o EndpointStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o EndpointStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o EndpointStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o EndpointStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o EndpointStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o EndpointStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o EndpointStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "message": o.Message, + "state": o.State, + }) } // Type implements basetypes.ObjectValuable. @@ -1647,52 +1005,15 @@ func (a GetEndpointRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetEndpointRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetEndpointRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetEndpointRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetEndpointRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetEndpointRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetEndpointRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetEndpointRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetEndpointRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + }) } // Type implements basetypes.ObjectValuable. @@ -1727,52 +1048,15 @@ func (a GetIndexRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + }) } // Type implements basetypes.ObjectValuable. @@ -1811,52 +1095,16 @@ func (a ListEndpointResponse) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListEndpointResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListEndpointResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListEndpointResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListEndpointResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListEndpointResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListEndpointResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListEndpointResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListEndpointResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoints": o.Endpoints, + "next_page_token": o.NextPageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1894,52 +1142,15 @@ func (a ListEndpointsRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListEndpointsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListEndpointsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListEndpointsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -1976,52 +1187,16 @@ func (a ListIndexesRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListIndexesRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListIndexesRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListIndexesRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListIndexesRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListIndexesRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListIndexesRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListIndexesRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListIndexesRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2057,52 +1232,15 @@ func (a ListValue) GetComplexFieldTypes(ctx context.Context) map[string]reflect. } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListValue{} - -// Equal implements basetypes.ObjectValuable. -func (o ListValue) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListValue) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListValue) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListValue) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListValue) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListValue) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListValue) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "values": o.Values, + }) } // Type implements basetypes.ObjectValuable. @@ -2143,52 +1281,16 @@ func (a ListVectorIndexesResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListVectorIndexesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListVectorIndexesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListVectorIndexesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "vector_indexes": o.VectorIndexes, + }) } // Type implements basetypes.ObjectValuable. @@ -2230,52 +1332,16 @@ func (a MapStringValueEntry) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MapStringValueEntry{} - -// Equal implements basetypes.ObjectValuable. -func (o MapStringValueEntry) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MapStringValueEntry) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MapStringValueEntry) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MapStringValueEntry) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MapStringValueEntry) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MapStringValueEntry) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MapStringValueEntry) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -2326,52 +1392,19 @@ func (a MiniVectorIndex) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MiniVectorIndex{} - -// Equal implements basetypes.ObjectValuable. -func (o MiniVectorIndex) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MiniVectorIndex) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MiniVectorIndex) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MiniVectorIndex) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MiniVectorIndex) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MiniVectorIndex) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MiniVectorIndex) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2415,52 +1448,17 @@ func (a QueryVectorIndexNextPageRequest) GetComplexFieldTypes(ctx context.Contex return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryVectorIndexNextPageRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexNextPageRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexNextPageRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "endpoint_name": o.EndpointName, + "index_name": o.IndexName, + "page_token": o.PageToken, + }) } // Type implements basetypes.ObjectValuable. @@ -2519,52 +1517,22 @@ func (a QueryVectorIndexRequest) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryVectorIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2618,52 +1586,17 @@ func (a QueryVectorIndexResponse) GetComplexFieldTypes(ctx context.Context) map[ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = QueryVectorIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o QueryVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o QueryVectorIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "manifest": o.Manifest, + "next_page_token": o.NextPageToken, + "result": o.Result, + }) } // Type implements basetypes.ObjectValuable. @@ -2708,52 +1641,16 @@ func (a ResultData) GetComplexFieldTypes(ctx context.Context) map[string]reflect } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResultData{} - -// Equal implements basetypes.ObjectValuable. -func (o ResultData) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResultData) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResultData) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResultData) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResultData) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResultData) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResultData) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data_array": o.DataArray, + "row_count": o.RowCount, + }) } // Type implements basetypes.ObjectValuable. @@ -2797,52 +1694,16 @@ func (a ResultManifest) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ResultManifest{} - -// Equal implements basetypes.ObjectValuable. -func (o ResultManifest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ResultManifest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ResultManifest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ResultManifest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ResultManifest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ResultManifest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ResultManifest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "column_count": o.ColumnCount, + "columns": o.Columns, + }) } // Type implements basetypes.ObjectValuable. @@ -2884,52 +1745,17 @@ func (a ScanVectorIndexRequest) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ScanVectorIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ScanVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ScanVectorIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + "last_primary_key": o.LastPrimaryKey, + "num_results": o.NumResults, + }) } // Type implements basetypes.ObjectValuable. @@ -2970,52 +1796,16 @@ func (a ScanVectorIndexResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ScanVectorIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ScanVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ScanVectorIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "data": o.Data, + "last_primary_key": o.LastPrimaryKey, + }) } // Type implements basetypes.ObjectValuable. @@ -3054,52 +1844,15 @@ func (a Struct) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Struct{} - -// Equal implements basetypes.ObjectValuable. -func (o Struct) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Struct) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Struct) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Struct) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Struct) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Struct) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Struct) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "fields": o.Fields, + }) } // Type implements basetypes.ObjectValuable. @@ -3136,52 +1889,15 @@ func (a SyncIndexRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SyncIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o SyncIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SyncIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SyncIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SyncIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SyncIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SyncIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SyncIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + }) } // Type implements basetypes.ObjectValuable. @@ -3213,52 +1929,13 @@ func (a SyncIndexResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SyncIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o SyncIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SyncIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SyncIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SyncIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SyncIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SyncIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SyncIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3295,52 +1972,16 @@ func (a UpsertDataResult) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpsertDataResult{} - -// Equal implements basetypes.ObjectValuable. -func (o UpsertDataResult) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpsertDataResult) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpsertDataResult) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpsertDataResult) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpsertDataResult) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpsertDataResult) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpsertDataResult) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "failed_primary_keys": o.FailedPrimaryKeys, + "success_row_count": o.SuccessRowCount, + }) } // Type implements basetypes.ObjectValuable. @@ -3381,52 +2022,16 @@ func (a UpsertDataVectorIndexRequest) GetComplexFieldTypes(ctx context.Context) return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpsertDataVectorIndexRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpsertDataVectorIndexRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_name": o.IndexName, + "inputs_json": o.InputsJson, + }) } // Type implements basetypes.ObjectValuable. @@ -3466,52 +2071,16 @@ func (a UpsertDataVectorIndexResponse) GetComplexFieldTypes(ctx context.Context) } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpsertDataVectorIndexResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpsertDataVectorIndexResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpsertDataVectorIndexResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "result": o.Result, + "status": o.Status, + }) } // Type implements basetypes.ObjectValuable. @@ -3560,52 +2129,20 @@ func (a Value) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Value{} - -// Equal implements basetypes.ObjectValuable. -func (o Value) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Value) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Value) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Value) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Value) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Value) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Value) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3672,52 +2209,22 @@ func (a VectorIndex) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = VectorIndex{} - -// Equal implements basetypes.ObjectValuable. -func (o VectorIndex) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o VectorIndex) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o VectorIndex) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o VectorIndex) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o VectorIndex) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o VectorIndex) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o VectorIndex) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -3770,52 +2277,18 @@ func (a VectorIndexStatus) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = VectorIndexStatus{} - -// Equal implements basetypes.ObjectValuable. -func (o VectorIndexStatus) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o VectorIndexStatus) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o VectorIndexStatus) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o VectorIndexStatus) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o VectorIndexStatus) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o VectorIndexStatus) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o VectorIndexStatus) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "index_url": o.IndexUrl, + "indexed_row_count": o.IndexedRowCount, + "message": o.Message, + "ready": o.Ready, + }) } // Type implements basetypes.ObjectValuable. diff --git a/internal/service/workspace_tf/model.go b/internal/service/workspace_tf/model.go index 9ffbb4a84..e510b6ac4 100755 --- a/internal/service/workspace_tf/model.go +++ b/internal/service/workspace_tf/model.go @@ -12,15 +12,11 @@ package workspace_tf import ( "context" - "fmt" "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/diag" "github.com/hashicorp/terraform-plugin-framework/types" "github.com/hashicorp/terraform-plugin-framework/types/basetypes" - "github.com/hashicorp/terraform-plugin-go/tftypes" ) type AclItem struct { @@ -47,52 +43,16 @@ func (a AclItem) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Ty return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AclItem{} - -// Equal implements basetypes.ObjectValuable. -func (o AclItem) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AclItem) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AclItem) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AclItem) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AclItem) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AclItem) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AclItem) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission": o.Permission, + "principal": o.Principal, + }) } // Type implements basetypes.ObjectValuable. @@ -130,52 +90,16 @@ func (a AzureKeyVaultSecretScopeMetadata) GetComplexFieldTypes(ctx context.Conte return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = AzureKeyVaultSecretScopeMetadata{} - -// Equal implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o AzureKeyVaultSecretScopeMetadata) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o AzureKeyVaultSecretScopeMetadata) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "dns_name": o.DnsName, + "resource_id": o.ResourceId, + }) } // Type implements basetypes.ObjectValuable. @@ -227,52 +151,17 @@ func (a CreateCredentialsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + "personal_access_token": o.PersonalAccessToken, + }) } // Type implements basetypes.ObjectValuable. @@ -313,52 +202,17 @@ func (a CreateCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) } // Type implements basetypes.ObjectValuable. @@ -408,52 +262,18 @@ func (a CreateRepoRequest) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRepoRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRepoRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRepoRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRepoRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRepoRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRepoRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRepoRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + "provider": o.Provider, + "sparse_checkout": o.SparseCheckout, + "url": o.Url, + }) } // Type implements basetypes.ObjectValuable. @@ -507,52 +327,21 @@ func (a CreateRepoResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateRepoResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateRepoResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateRepoResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateRepoResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateRepoResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateRepoResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateRepoResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -604,52 +393,18 @@ func (a CreateScope) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateScope{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateScope) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateScope) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateScope) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateScope) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateScope) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateScope) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateScope) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -686,52 +441,13 @@ func (a CreateScopeResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CreateScopeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o CreateScopeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CreateScopeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CreateScopeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CreateScopeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CreateScopeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CreateScopeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CreateScopeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -768,52 +484,17 @@ func (a CredentialInfo) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = CredentialInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o CredentialInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o CredentialInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o CredentialInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o CredentialInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o CredentialInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o CredentialInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o CredentialInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) } // Type implements basetypes.ObjectValuable. @@ -854,52 +535,16 @@ func (a Delete) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Delete{} - -// Equal implements basetypes.ObjectValuable. -func (o Delete) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Delete) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Delete) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Delete) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Delete) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Delete) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Delete) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + "recursive": o.Recursive, + }) } // Type implements basetypes.ObjectValuable. @@ -936,52 +581,16 @@ func (a DeleteAcl) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAcl{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAcl) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAcl) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAcl) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAcl) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAcl) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAcl) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAcl) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal": o.Principal, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -1014,52 +623,13 @@ func (a DeleteAclResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteAclResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteAclResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteAclResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteAclResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteAclResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteAclResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteAclResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteAclResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1092,52 +662,15 @@ func (a DeleteCredentialsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + }) } // Type implements basetypes.ObjectValuable. @@ -1169,52 +702,13 @@ func (a DeleteCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1247,52 +741,15 @@ func (a DeleteRepoRequest) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRepoRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRepoRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repo_id": o.RepoId, + }) } // Type implements basetypes.ObjectValuable. @@ -1324,52 +781,13 @@ func (a DeleteRepoResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteRepoResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteRepoResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1399,52 +817,13 @@ func (a DeleteResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK types cannot implement the ObjectValuable interface directly, as it would otherwise +// interfere with how the plugin framework retrieves and sets values in state. Thus, DeleteResponse +// only implements ToObjectValue() and Type(). +func (o DeleteResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1476,52 +855,15 @@ func (a DeleteScope) GetComplexFieldTypes(ctx context.Context) map[string]reflec return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteScope{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteScope) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteScope) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteScope) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteScope) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteScope) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteScope) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteScope) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -1553,52 +895,13 @@ func (a DeleteScopeResponse) GetComplexFieldTypes(ctx context.Context) map[strin return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteScopeResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteScopeResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteScopeResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1632,52 +935,16 @@ func (a DeleteSecret) GetComplexFieldTypes(ctx context.Context) map[string]refle return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteSecret{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteSecret) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteSecret) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteSecret) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteSecret) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteSecret) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteSecret) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteSecret) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -1710,52 +977,13 @@ func (a DeleteSecretResponse) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = DeleteSecretResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o DeleteSecretResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o DeleteSecretResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -1804,52 +1032,16 @@ func (a ExportRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "format": o.Format, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -1887,52 +1079,16 @@ func (a ExportResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ExportResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ExportResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ExportResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ExportResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ExportResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ExportResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ExportResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ExportResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "file_type": o.FileType, + }) } // Type implements basetypes.ObjectValuable. @@ -1970,52 +1126,16 @@ func (a GetAclRequest) GetComplexFieldTypes(ctx context.Context) map[string]refl return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetAclRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetAclRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetAclRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetAclRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetAclRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetAclRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetAclRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetAclRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "principal": o.Principal, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -2051,52 +1171,15 @@ func (a GetCredentialsRequest) GetComplexFieldTypes(ctx context.Context) map[str return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + }) } // Type implements basetypes.ObjectValuable. @@ -2135,52 +1218,17 @@ func (a GetCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map[st return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credential_id": o.CredentialId, + "git_provider": o.GitProvider, + "git_username": o.GitUsername, + }) } // Type implements basetypes.ObjectValuable. @@ -2217,52 +1265,15 @@ func (a GetRepoPermissionLevelsRequest) GetComplexFieldTypes(ctx context.Context return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRepoPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repo_id": o.RepoId, + }) } // Type implements basetypes.ObjectValuable. @@ -2298,52 +1309,15 @@ func (a GetRepoPermissionLevelsResponse) GetComplexFieldTypes(ctx context.Contex } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRepoPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -2380,52 +1354,15 @@ func (a GetRepoPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRepoPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRepoPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRepoPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repo_id": o.RepoId, + }) } // Type implements basetypes.ObjectValuable. @@ -2460,52 +1397,15 @@ func (a GetRepoRequest) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRepoRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRepoRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRepoRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRepoRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRepoRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRepoRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRepoRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "repo_id": o.RepoId, + }) } // Type implements basetypes.ObjectValuable. @@ -2553,52 +1453,21 @@ func (a GetRepoResponse) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetRepoResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetRepoResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetRepoResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetRepoResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetRepoResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetRepoResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetRepoResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -2643,52 +1512,16 @@ func (a GetSecretRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetSecretRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetSecretRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetSecretRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetSecretRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetSecretRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetSecretRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetSecretRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetSecretRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -2725,52 +1558,16 @@ func (a GetSecretResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetSecretResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetSecretResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetSecretResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetSecretResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetSecretResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetSecretResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetSecretResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetSecretResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "value": o.Value, + }) } // Type implements basetypes.ObjectValuable. @@ -2806,52 +1603,15 @@ func (a GetStatusRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetStatusRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetStatusRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetStatusRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetStatusRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetStatusRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetStatusRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -2888,52 +1648,16 @@ func (a GetWorkspaceObjectPermissionLevelsRequest) GetComplexFieldTypes(ctx cont return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceObjectPermissionLevelsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionLevelsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -2970,52 +1694,15 @@ func (a GetWorkspaceObjectPermissionLevelsResponse) GetComplexFieldTypes(ctx con } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceObjectPermissionLevelsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionLevelsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionLevelsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission_levels": o.PermissionLevels, + }) } // Type implements basetypes.ObjectValuable. @@ -3054,52 +1741,16 @@ func (a GetWorkspaceObjectPermissionsRequest) GetComplexFieldTypes(ctx context.C return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = GetWorkspaceObjectPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o GetWorkspaceObjectPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o GetWorkspaceObjectPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -3158,56 +1809,23 @@ func (newState *Import) SyncEffectiveFieldsDuringRead(existingState Import) { // are the reflected types of the contained elements. They must 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) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { - return map[string]reflect.Type{} -} - -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Import{} - -// Equal implements basetypes.ObjectValuable. -func (o Import) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Import) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Import) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Import) String() string { - return fmt.Sprintf("%#v", o) +func (a Import) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Type { + return map[string]reflect.Type{} } -// ToObjectValue implements basetypes.ObjectValuable. -func (o Import) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Import) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Import) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "content": o.Content, + "format": o.Format, + "language": o.Language, + "overwrite": o.Overwrite, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -3243,52 +1861,13 @@ func (a ImportResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ImportResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ImportResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ImportResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ImportResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ImportResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ImportResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ImportResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ImportResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -3321,52 +1900,15 @@ func (a ListAclsRequest) GetComplexFieldTypes(ctx context.Context) map[string]re return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAclsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAclsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAclsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAclsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAclsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAclsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAclsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAclsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -3402,52 +1944,15 @@ func (a ListAclsResponse) GetComplexFieldTypes(ctx context.Context) map[string]r } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListAclsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListAclsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListAclsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListAclsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListAclsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListAclsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListAclsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListAclsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "items": o.Items, + }) } // Type implements basetypes.ObjectValuable. @@ -3485,52 +1990,15 @@ func (a ListCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map[s } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "credentials": o.Credentials, + }) } // Type implements basetypes.ObjectValuable. @@ -3573,52 +2041,16 @@ func (a ListReposRequest) GetComplexFieldTypes(ctx context.Context) map[string]r return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListReposRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListReposRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListReposRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListReposRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListReposRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListReposRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListReposRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListReposRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "path_prefix": o.PathPrefix, + }) } // Type implements basetypes.ObjectValuable. @@ -3658,52 +2090,16 @@ func (a ListReposResponse) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListReposResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListReposResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListReposResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListReposResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListReposResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListReposResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListReposResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListReposResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "next_page_token": o.NextPageToken, + "repos": o.Repos, + }) } // Type implements basetypes.ObjectValuable. @@ -3742,52 +2138,15 @@ func (a ListResponse) GetComplexFieldTypes(ctx context.Context) map[string]refle } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "objects": o.Objects, + }) } // Type implements basetypes.ObjectValuable. @@ -3825,52 +2184,15 @@ func (a ListScopesResponse) GetComplexFieldTypes(ctx context.Context) map[string } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListScopesResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListScopesResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListScopesResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListScopesResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListScopesResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListScopesResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListScopesResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListScopesResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "scopes": o.Scopes, + }) } // Type implements basetypes.ObjectValuable. @@ -3907,52 +2229,15 @@ func (a ListSecretsRequest) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSecretsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSecretsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSecretsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSecretsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSecretsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSecretsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSecretsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSecretsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -3988,52 +2273,15 @@ func (a ListSecretsResponse) GetComplexFieldTypes(ctx context.Context) map[strin } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListSecretsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o ListSecretsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListSecretsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListSecretsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListSecretsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListSecretsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListSecretsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListSecretsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "secrets": o.Secrets, + }) } // Type implements basetypes.ObjectValuable. @@ -4072,52 +2320,16 @@ func (a ListWorkspaceRequest) GetComplexFieldTypes(ctx context.Context) map[stri return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ListWorkspaceRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ListWorkspaceRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ListWorkspaceRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "notebooks_modified_after": o.NotebooksModifiedAfter, + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -4154,52 +2366,15 @@ func (a Mkdirs) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = Mkdirs{} - -// Equal implements basetypes.ObjectValuable. -func (o Mkdirs) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o Mkdirs) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o Mkdirs) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o Mkdirs) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o Mkdirs) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o Mkdirs) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o Mkdirs) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "path": o.Path, + }) } // Type implements basetypes.ObjectValuable. @@ -4231,52 +2406,13 @@ func (a MkdirsResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = MkdirsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o MkdirsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o MkdirsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o MkdirsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o MkdirsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o MkdirsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o MkdirsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o MkdirsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4328,52 +2464,22 @@ func (a ObjectInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = ObjectInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o ObjectInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o ObjectInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o ObjectInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o ObjectInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o ObjectInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o ObjectInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o ObjectInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4418,52 +2524,17 @@ func (a PutAcl) GetComplexFieldTypes(ctx context.Context) map[string]reflect.Typ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutAcl{} - -// Equal implements basetypes.ObjectValuable. -func (o PutAcl) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutAcl) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutAcl) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutAcl) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutAcl) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutAcl) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutAcl) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "permission": o.Permission, + "principal": o.Principal, + "scope": o.Scope, + }) } // Type implements basetypes.ObjectValuable. @@ -4497,52 +2568,13 @@ func (a PutAclResponse) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutAclResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PutAclResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutAclResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutAclResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutAclResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutAclResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutAclResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutAclResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4580,52 +2612,18 @@ func (a PutSecret) GetComplexFieldTypes(ctx context.Context) map[string]reflect. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutSecret{} - -// Equal implements basetypes.ObjectValuable. -func (o PutSecret) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutSecret) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutSecret) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutSecret) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutSecret) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutSecret) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutSecret) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "bytes_value": o.BytesValue, + "key": o.Key, + "scope": o.Scope, + "string_value": o.StringValue, + }) } // Type implements basetypes.ObjectValuable. @@ -4660,52 +2658,13 @@ func (a PutSecretResponse) GetComplexFieldTypes(ctx context.Context) map[string] return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = PutSecretResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o PutSecretResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o PutSecretResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o PutSecretResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o PutSecretResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o PutSecretResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o PutSecretResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o PutSecretResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -4743,52 +2702,18 @@ func (a RepoAccessControlRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4835,52 +2760,19 @@ func (a RepoAccessControlResponse) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -4935,52 +2827,21 @@ func (a RepoInfo) GetComplexFieldTypes(ctx context.Context) map[string]reflect.T } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoInfo{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoInfo) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoInfo) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoInfo) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoInfo) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoInfo) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoInfo) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoInfo) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5027,52 +2888,17 @@ func (a RepoPermission) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -5115,52 +2941,17 @@ func (a RepoPermissions) GetComplexFieldTypes(ctx context.Context) map[string]re } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -5199,52 +2990,16 @@ func (a RepoPermissionsDescription) GetComplexFieldTypes(ctx context.Context) ma return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -5282,52 +3037,16 @@ func (a RepoPermissionsRequest) GetComplexFieldTypes(ctx context.Context) map[st } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = RepoPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o RepoPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o RepoPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "repo_id": o.RepoId, + }) } // Type implements basetypes.ObjectValuable. @@ -5366,52 +3085,16 @@ func (a SecretMetadata) GetComplexFieldTypes(ctx context.Context) map[string]ref return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SecretMetadata{} - -// Equal implements basetypes.ObjectValuable. -func (o SecretMetadata) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SecretMetadata) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SecretMetadata) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SecretMetadata) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SecretMetadata) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SecretMetadata) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SecretMetadata) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "key": o.Key, + "last_updated_timestamp": o.LastUpdatedTimestamp, + }) } // Type implements basetypes.ObjectValuable. @@ -5452,52 +3135,17 @@ func (a SecretScope) GetComplexFieldTypes(ctx context.Context) map[string]reflec } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SecretScope{} - -// Equal implements basetypes.ObjectValuable. -func (o SecretScope) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SecretScope) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SecretScope) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SecretScope) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SecretScope) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SecretScope) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SecretScope) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "backend_type": o.BackendType, + "keyvault_metadata": o.KeyvaultMetadata, + "name": o.Name, + }) } // Type implements basetypes.ObjectValuable. @@ -5541,52 +3189,15 @@ func (a SparseCheckout) GetComplexFieldTypes(ctx context.Context) map[string]ref } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparseCheckout{} - -// Equal implements basetypes.ObjectValuable. -func (o SparseCheckout) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparseCheckout) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparseCheckout) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparseCheckout) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparseCheckout) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparseCheckout) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparseCheckout) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "patterns": o.Patterns, + }) } // Type implements basetypes.ObjectValuable. @@ -5628,52 +3239,15 @@ func (a SparseCheckoutUpdate) GetComplexFieldTypes(ctx context.Context) map[stri } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = SparseCheckoutUpdate{} - -// Equal implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o SparseCheckoutUpdate) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o SparseCheckoutUpdate) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "patterns": o.Patterns, + }) } // Type implements basetypes.ObjectValuable. @@ -5728,52 +3302,18 @@ func (a UpdateCredentialsRequest) GetComplexFieldTypes(ctx context.Context) map[ return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCredentialsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCredentialsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -5808,52 +3348,13 @@ func (a UpdateCredentialsResponse) GetComplexFieldTypes(ctx context.Context) map return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateCredentialsResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateCredentialsResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateCredentialsResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -5897,52 +3398,18 @@ func (a UpdateRepoRequest) GetComplexFieldTypes(ctx context.Context) map[string] } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRepoRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRepoRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRepoRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "branch": o.Branch, + "repo_id": o.RepoId, + "sparse_checkout": o.SparseCheckout, + "tag": o.Tag, + }) } // Type implements basetypes.ObjectValuable. @@ -5979,52 +3446,13 @@ func (a UpdateRepoResponse) GetComplexFieldTypes(ctx context.Context) map[string return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = UpdateRepoResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o UpdateRepoResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o UpdateRepoResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{}) } // Type implements basetypes.ObjectValuable. @@ -6062,52 +3490,18 @@ func (a WorkspaceObjectAccessControlRequest) GetComplexFieldTypes(ctx context.Co return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectAccessControlRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectAccessControlRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6154,52 +3548,19 @@ func (a WorkspaceObjectAccessControlResponse) GetComplexFieldTypes(ctx context.C } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectAccessControlResponse{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectAccessControlResponse) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectAccessControlResponse) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + 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. @@ -6244,52 +3605,17 @@ func (a WorkspaceObjectPermission) GetComplexFieldTypes(ctx context.Context) map } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectPermission{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermission) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermission) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "inherited": o.Inherited, + "inherited_from_object": o.InheritedFromObject, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -6332,52 +3658,17 @@ func (a WorkspaceObjectPermissions) GetComplexFieldTypes(ctx context.Context) ma } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectPermissions{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissions) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissions) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "object_id": o.ObjectId, + "object_type": o.ObjectType, + }) } // Type implements basetypes.ObjectValuable. @@ -6416,52 +3707,16 @@ func (a WorkspaceObjectPermissionsDescription) GetComplexFieldTypes(ctx context. return map[string]reflect.Type{} } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectPermissionsDescription{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissionsDescription) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsDescription) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "description": o.Description, + "permission_level": o.PermissionLevel, + }) } // Type implements basetypes.ObjectValuable. @@ -6501,52 +3756,17 @@ func (a WorkspaceObjectPermissionsRequest) GetComplexFieldTypes(ctx context.Cont } } -// TFSDK types also implement the ObjectValuable interface, so they can be used directly as objects -// and as elements in lists and maps. -var _ basetypes.ObjectValuable = WorkspaceObjectPermissionsRequest{} - -// Equal implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) Equal(v attr.Value) bool { - ov, d := o.ToObjectValue(context.Background()) - if d.HasError() { - return false - } - return ov.Equal(v) -} - -// IsNull implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) IsNull() bool { - // TF SDK structures are never null. - return false -} - -// IsUnknown implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) IsUnknown() bool { - // TF SDK structures are never unknown. - return false -} - -// String implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) String() string { - return fmt.Sprintf("%#v", o) -} - -// ToObjectValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) ToObjectValue(ctx context.Context) (basetypes.ObjectValue, diag.Diagnostics) { - return types.ObjectValueFrom( - ctx, +// TFSDK 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 +// only implements ToObjectValue() and Type(). +func (o WorkspaceObjectPermissionsRequest) ToObjectValue(ctx context.Context) basetypes.ObjectValue { + return types.ObjectValueMust( o.Type(ctx).(basetypes.ObjectType).AttrTypes, - o, - ) -} - -// ToTerraformValue implements basetypes.ObjectValuable. -func (o WorkspaceObjectPermissionsRequest) ToTerraformValue(ctx context.Context) (tftypes.Value, error) { - ov, d := o.ToObjectValue(ctx) - if d.HasError() { - return tftypes.Value{}, fmt.Errorf("error converting to object value: %s", pluginfwcommon.DiagToString(d)) - } - return ov.ToTerraformValue(ctx) + map[string]attr.Value{ + "access_control_list": o.AccessControlList, + "workspace_object_id": o.WorkspaceObjectId, + "workspace_object_type": o.WorkspaceObjectType, + }) } // Type implements basetypes.ObjectValuable.