// Copyright (c) 2025 Aiven, Helsinki, Finland. https://aiven.io/
// Code generated by user config generator. DO NOT EDIT.

package organization

import (
	"context"

	"github.com/hashicorp/terraform-plugin-framework-timeouts/datasource/timeouts"
	"github.com/hashicorp/terraform-plugin-framework/datasource/schema"
	"github.com/hashicorp/terraform-plugin-framework/types"

	"github.com/aiven/terraform-provider-aiven/internal/plugin/adapter"
)

func newDatasourceModel() adapter.Model[tfModel] {
	return new(datasourceModel)
}

// datasourceModel with specific datasource timeouts
type datasourceModel struct {
	tfModel
	Timeouts timeouts.Value `tfsdk:"timeouts"`
}

func (tf *datasourceModel) SharedModel() *tfModel {
	return &tf.tfModel
}

func (tf *datasourceModel) TimeoutsObject() types.Object {
	return tf.Timeouts.Object
}

/*
newDatasourceSchema:

	data "aiven_organization" "example" {
	  id = "foo"

	  // COMPUTED FIELDS
	  create_time = "foo"
	  name        = "test"
	  tenant_id   = "foo"
	  update_time = "foo"
	}
*/
func newDatasourceSchema(ctx context.Context) schema.Schema {
	return schema.Schema{
		Attributes: map[string]schema.Attribute{
			"create_time": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "Timestamp in ISO 8601 format, always in UTC.",
			},
			"id": schema.StringAttribute{
				MarkdownDescription: "The organization ID.",
				Required:            true,
			},
			"name": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "Name of the organization.",
			},
			"tenant_id": schema.StringAttribute{
				Computed:            true,
				DeprecationMessage:  "This field is deprecated and will be removed in the next major release.",
				MarkdownDescription: "Tenant identifier.",
			},
			"update_time": schema.StringAttribute{
				Computed:            true,
				MarkdownDescription: "Timestamp in ISO 8601 format, always in UTC.",
			},
		},
		Blocks:              map[string]schema.Block{"timeouts": timeouts.Block(ctx)},
		MarkdownDescription: "Gets information about an organization.",
	}
}
