datasource

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2024 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package datasource contains data source specific types, such as attributes and blocks, for the Go bindings of the JSON schema specification.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attribute

type Attribute struct {
	// Name defines the attribute name.
	Name string `json:"name"`

	Bool         *BoolAttribute         `json:"bool,omitempty"`
	Dynamic      *DynamicAttribute      `json:"dynamic,omitempty"`
	Float64      *Float64Attribute      `json:"float64,omitempty"`
	Int64        *Int64Attribute        `json:"int64,omitempty"`
	List         *ListAttribute         `json:"list,omitempty"`
	ListNested   *ListNestedAttribute   `json:"list_nested,omitempty"`
	Map          *MapAttribute          `json:"map,omitempty"`
	MapNested    *MapNestedAttribute    `json:"map_nested,omitempty"`
	Number       *NumberAttribute       `json:"number,omitempty"`
	Object       *ObjectAttribute       `json:"object,omitempty"`
	Set          *SetAttribute          `json:"set,omitempty"`
	SetNested    *SetNestedAttribute    `json:"set_nested,omitempty"`
	SingleNested *SingleNestedAttribute `json:"single_nested,omitempty"`
	String       *StringAttribute       `json:"string,omitempty"`
}

Attribute defines a value field inside a Schema. The attribute types (e.g., Bool, Float64) are mutually exclusive, one and only one must be specified.

type AttributeValidateRequest

type AttributeValidateRequest struct {
	Path string
}

AttributeValidateRequest defines the Path of the attribute that is being validated.

type Attributes

type Attributes []Attribute

Attributes type defines Attribute types.

func (Attributes) Validate

Validate checks for duplicated attribute names. Validate is called recursively in instances where an attribute contains nested attributes. Validate delegates to ObjectAttributeTypes.Validate when the attribute is an ObjectAttribute.

type Block

type Block struct {
	Name string `json:"name"`

	ListNested   *ListNestedBlock   `json:"list_nested,omitempty"`
	SetNested    *SetNestedBlock    `json:"set_nested,omitempty"`
	SingleNested *SingleNestedBlock `json:"single_nested,omitempty"`
}

Block defines a structural field inside a Schema. The block types (e.g., ListNested, SetNested) are mutually exclusive, one and only one must be specified.

type BlockValidateRequest

type BlockValidateRequest struct {
	Path string
}

BlockValidateRequest defines the Path of the block that is being validated.

type Blocks

type Blocks []Block

Blocks type defines Block types.

func (Blocks) Validate

func (b Blocks) Validate(ctx context.Context, req BlockValidateRequest) error

Validate checks for duplicated block names. Validate is called recursively in instances where a block contains nested blocks. Validate delegates to Attributes.Validate in instances where the block has attributes.

type BoolAttribute

type BoolAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a BoolAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.BoolValidators `json:"validators,omitempty"`
}

BoolAttribute represents a Schema attribute that is a boolean.

type DataSource

type DataSource struct {
	// Name is the string identifier for the data source.
	Name string `json:"name"`

	// Schema defines the Attributes and Blocks for the data source.
	Schema *Schema `json:"schema,omitempty"`
}

DataSource defines an individual data source.

func (DataSource) Validate

func (r DataSource) Validate(ctx context.Context, req ValidateRequest) error

Validate delegates to Schema.Validate.

type DataSources

type DataSources []DataSource

DataSources type defines DataSource types.

func (DataSources) Validate

Validate checks for duplicated data source names and delegates to DataSource.Validate for each data source.

type DataSourcesValidateRequest

type DataSourcesValidateRequest struct{}

DataSourcesValidateRequest defines the request sent during validation of DataSources.

type DynamicAttribute added in v0.2.0

type DynamicAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a DynamicAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.DynamicValidators `json:"validators,omitempty"`
}

DynamicAttribute represents a Schema attribute that is dynamic.

type Float64Attribute

type Float64Attribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a Float64Attribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.Float64Validators `json:"validators,omitempty"`
}

Float64Attribute represents a Schema attribute that is a 64-bit floating point number.

Use Int64Attribute for a 64-bit integer attribute, or NumberAttribute for a 512-bit generic number attribute.

type Int64Attribute

type Int64Attribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a Int64Attribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.Int64Validators `json:"validators,omitempty"`
}

Int64Attribute represents a schema attribute that is a 64-bit integer.

Use Float64Attribute for a 64-bit floating point number, or NumberAttribute for a 512-bit generic number attribute.

type ListAttribute

type ListAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a ListAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// ElementType is the type for all elements of the list.
	ElementType schema.ElementType `json:"element_type"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.ListValidators `json:"validators,omitempty"`
}

ListAttribute represents a Schema attribute that is a list with a single element type.

type ListNestedAttribute

type ListNestedAttribute struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// NestedObject defines the underlying object attributes.
	NestedObject NestedAttributeObject `json:"nested_object"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.ListValidators `json:"validators,omitempty"`
}

ListNestedAttribute represents a Schema attribute that is a list of objects, where the object attributes can be fully defined.

type ListNestedBlock

type ListNestedBlock struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// NestedObject defines the underlying object attributes and blocks.
	NestedObject NestedBlockObject `json:"nested_object"`

	// CustomType defines a custom type and value for the block.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the block
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the block.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the block should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the block.
	Validators schema.ListValidators `json:"validators,omitempty"`
}

ListNestedBlock represents a block that is a list of objects where the object attributes can be fully defined

type MapAttribute

type MapAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a MapAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// ElementType is the type for all elements of the map.
	ElementType schema.ElementType `json:"element_type"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`
	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.MapValidators `json:"validators,omitempty"`
}

MapAttribute represents a Schema attribute that is a map with a single element type.

type MapNestedAttribute

type MapNestedAttribute struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// NestedObject defines the underlying object attributes.
	NestedObject NestedAttributeObject `json:"nested_object"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.MapValidators `json:"validators,omitempty"`
}

MapNestedAttribute represents a Schema attribute that is a map of name to objects, where the object attributes can be fully defined.

type NestedAttributeObject

type NestedAttributeObject struct {
	// AssociatedExternalType defines a type that can be used as a NestedAttributeObject.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// Attributes defines the Attribute types associated with a NestedAttributeObject.
	Attributes Attributes `json:"attributes,omitempty"`

	// CustomType defines a custom type and value for the NestedAttributeObject.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the NestedAttributeObject.
	Validators schema.ObjectValidators `json:"validators,omitempty"`
}

NestedAttributeObject is the underlying object defining the Attributes for a ListNestedAttribute, MapNestedAttribute, or SetNestedAttribute.

type NestedBlockObject

type NestedBlockObject struct {
	// Attributes defines the Attribute types associated with a NestedBlockObject.
	Attributes Attributes `json:"attributes,omitempty"`

	// Blocks defines the Block types associated with a NestedBlockObject.
	Blocks Blocks `json:"blocks,omitempty"`

	// AssociatedExternalType defines a type that can be used as a NestedBlockObject.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// CustomType defines a custom type and value for the NestedBlockObject.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the NestedBlockObject.
	Validators schema.ObjectValidators `json:"validators,omitempty"`
}

NestedBlockObject is the underlying object defining the Attributes for a ListNestedBlock, or SetNestedBlock.

type NumberAttribute

type NumberAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a NumberAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.NumberValidators `json:"validators,omitempty"`
}

NumberAttribute represents a schema attribute that is a generic number with up to 512 bits of floating point or integer precision.

Use Float64Attribute for a 64-bit floating point number attribute, or Int64Attribute for a 64-bit integer number attribute.

type ObjectAttribute

type ObjectAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent an ObjectAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// AttributeTypes provides the mapping of underlying names to types.
	AttributeTypes schema.ObjectAttributeTypes `json:"attribute_types"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.ObjectValidators `json:"validators,omitempty"`
}

ObjectAttribute represents a Schema attribute that is an object with only type information for underlying attributes.

type Schema

type Schema struct {
	// Attributes defines the Attribute types for the Schema..
	Attributes Attributes `json:"attributes,omitempty"`

	// Blocks defines the Block types for the Schema.
	Blocks Blocks `json:"blocks,omitempty"`

	// Description is used in various tooling, like the language server, to
	// give practitioners more information about what this data source is,
	// what it's for, and how it should be used. It should be written as
	// plain text, with no special formatting.
	Description *string `json:"description,omitempty"`

	// MarkdownDescription is used in various tooling, like the
	// documentation generator, to give practitioners more information
	// about what this data source is, what it's for, and how it should be
	// used. It should be formatted using Markdown.
	MarkdownDescription *string `json:"markdown_description,omitempty"`

	// DeprecationMessage defines warning diagnostic details to display when
	// practitioner configurations use this data source. The warning diagnostic
	// summary is automatically set to "Data Source Deprecated" along with
	// configuration source file and line information.
	//
	// Set this field to a practitioner actionable message such as:
	//
	//  - "Use examplecloud_other data source instead. This data source
	//    will be removed in the next major version of the provider."
	//  - "Remove this data source as it no longer is valid and
	//    will be removed in the next major version of the provider."
	//
	DeprecationMessage *string `json:"deprecation_message,omitempty"`
}

Schema defines the Attributes and Blocks associated with a DataSource.

func (Schema) Validate

func (s Schema) Validate(ctx context.Context, req SchemaValidateRequest) error

Validate delegates to Attributes.Validate and Blocks.Validate.

type SchemaValidateRequest

type SchemaValidateRequest struct {
	Path string
}

SchemaValidateRequest specifies the data source being validated.

type SetAttribute

type SetAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a SetAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// ElementType is the type for all elements of the set.
	ElementType schema.ElementType `json:"element_type"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.SetValidators `json:"validators,omitempty"`
}

SetAttribute represents a Schema attribute that is a set with a single element type.

type SetNestedAttribute

type SetNestedAttribute struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// NestedObject defines the underlying object attributes.
	NestedObject NestedAttributeObject `json:"nested_object"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.SetValidators `json:"validators,omitempty"`
}

SetNestedAttribute represents a Schema attribute that is a list of objects, where the object attributes can be fully defined.

type SetNestedBlock

type SetNestedBlock struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// NestedObject defines the underlying object attributes and blocks.
	NestedObject NestedBlockObject `json:"nested_object"`

	// CustomType defines a custom type and value for the block.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the block
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the block.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the block should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the block.
	Validators schema.SetValidators `json:"validators,omitempty"`
}

SetNestedBlock represents a block that is a set of objects where the object attributes can be fully defined

type SingleNestedAttribute

type SingleNestedAttribute struct {
	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// Attributes defines the Attribute types associated with a SingleNestedAttribute.
	Attributes Attributes `json:"attributes,omitempty"`

	// AssociatedExternalType defines a type that can be used as a NestedAttributeObject.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	CustomType *schema.CustomType `json:"custom_type,omitempty"`
	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.ObjectValidators `json:"validators,omitempty"`
}

SingleNestedAttribute represents a Schema attribute that is a single object where the object attributes can be fully defined

type SingleNestedBlock

type SingleNestedBlock struct {
	// Attributes defines the Attribute types associated with the SingleNestedBlock.
	Attributes Attributes `json:"attributes,omitempty"`

	// Blocks defines the Block types associated with the SingleNestedBlock.
	Blocks Blocks `json:"blocks,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// AssociatedExternalType defines a type that can be used as a NestedAttributeObject.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// CustomType defines a custom type and value for the block.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the block
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the block.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the block should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the block.
	Validators schema.ObjectValidators `json:"validators,omitempty"`
}

SingleNestedBlock represents a block that is a single object where the object attributes can be fully defined.

type StringAttribute

type StringAttribute struct {
	// AssociatedExternalType defines a Go type that can be used to represent a StringAttribute.
	AssociatedExternalType *schema.AssociatedExternalType `json:"associated_external_type,omitempty"`

	// ComputedOptionalRequired indicates whether the attribute is required
	// (`required`), optional (`optional`), computed (`computed`), or
	// computed and optional (`computed_optional`).
	ComputedOptionalRequired schema.ComputedOptionalRequired `json:"computed_optional_required"`

	// CustomType defines a custom type and value for the attribute.
	CustomType *schema.CustomType `json:"custom_type,omitempty"`

	// DeprecationMessage defines a message describing that the attribute
	// is deprecated.
	DeprecationMessage *string `json:"deprecation_message,omitempty"`

	// Description defines the purpose and usage of the attribute.
	Description *string `json:"description,omitempty"`

	// Sensitive indicates whether the value of the attribute should
	// be considered sensitive data.
	Sensitive *bool `json:"sensitive,omitempty"`

	// Validators define types and functions that provide validation
	// functionality for the attribute.
	Validators schema.StringValidators `json:"validators,omitempty"`
}

StringAttribute represents a Schema attribute that is a string.

type ValidateRequest

type ValidateRequest struct {
	Path string
}

ValidateRequest defines the Path of the data source that is being validated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL