supertypes

package module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: MPL-2.0 Imports: 14 Imported by: 1

README

terraform-plugin-framework-supertypes

This repository contains the custom types for the Terraform Plugin Framework.

Why supertypes?

The supertypes are custom types that are used to extend the functionality of the Terraform Plugin Framework. They are used to define the custom types that are used in the Terraform Plugin Framework.

Custom types available in the supertypes:

  • StringType - A custom type that is used to define the string type.
  • Int64Type - A custom type that is used to define the integer type.
  • NumberType - A custom type that is used to define the number type.
  • BoolType - A custom type that is used to define the boolean type.
  • Float64Type - A custom type that is used to define the float type.
  • MapType - A custom type that is used to define the map type.
  • ListType - A custom type that is used to define the list type.
  • SetType - A custom type that is used to define the set type.
  • MapNestedType - A custom type that is used to define the nested map type.
  • ListNestedType - A custom type that is used to define the nested list type.
  • SetNestedType - A custom type that is used to define the nested set type.
  • MapNestedObjectValueOf - A custom type that is used to define the nested object value of the map type. This type use golang generics to construct automatically the nested object.
  • ListNestedObjectValueOf - A custom type that is used to define the nested object value of the list type. This type use golang generics to construct automatically the nested object.
  • SetNestedObjectValueOf - A custom type that is used to define the nested object value of the set type. This type use golang generics to construct automatically the nested object.

Principal functions available for each custom type:

  • Get() - A function that is used to get the value.
  • Set() - A function that is used to set the value.
  • SetNull() - A function that is used to set the value to null.
  • SetUnknown() - A function that is used to set the value to unknown.
  • IsKnown() - A function that is used to check if the value is known.

Special functions available for the Float64Type:

  • SetFloat32() - A function that is used to set the float32 value into the float64.
  • SetFloat64() - A function that is used to set the float64 value into the float64.
  • SetFloat32Ptr() - A function that is used to set the float32 pointer value into the float64.
  • SetFloat64Ptr() - A function that is used to set the float64 pointer value into the float64.
  • GetFloat32() - A function that is used to get the value as a float32.
  • GetFloat64() - A function that is used to get the value as a float64.
  • GetFloat32Ptr() - A function that is used to get the value as a float32 pointer.
  • GetFloat64Ptr() - A function that is used to get the value as a float64 pointer.

Special functions available for the Int64Type:

  • SetInt() - A function that is used to set int into the int64.
  • SetInt8() - A function that is used to set int8 into the int64.
  • SetInt16() - A function that is used to set int16 into the int64.
  • SetInt32() - A function that is used to set int32 into the int64.
  • SetInt64() - A function that is used to set int64 into the int64.
  • SetIntPtr() - A function that is used to set int pointer into the int64.
  • SetInt8Ptr() - A function that is used to set int8 pointer into the int64.
  • SetInt16Ptr() - A function that is used to set int16 pointer into the int64.
  • SetInt32Ptr() - A function that is used to set int32 pointer into the int64.
  • SetInt64Ptr() - A function that is used to set int64 pointer into the int64.
  • GetInt() - A function that is used to get the value as an int.
  • GetInt8() - A function that is used to get the value as an int8.
  • GetInt16() - A function that is used to get the value as an int16.
  • GetInt32() - A function that is used to get the value as an int32.
  • GetInt64() - A function that is used to get the value as an int64.
  • GetIntPtr() - A function that is used to get the value as an int pointer.
  • GetInt8Ptr() - A function that is used to get the value as an int8 pointer.
  • GetInt16Ptr() - A function that is used to get the value as an int16 pointer.
  • GetInt32Ptr() - A function that is used to get the value as an int32 pointer.
  • GetInt64Ptr() - A function that is used to get the value as an int64 pointer.

Installation

For installing the supertypes, you can use the go get command:

go get github.com/orange-cloudavenue/terraform-plugin-framework-supertypes@latest

Documentation

documentation is in progress.

Documentation

Overview

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

-------------------------------------------------------------------- // ! DO NOT EDIT. This file is auto-generated from template ! // -------------------------------------------------------------------- //

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AttributeTypes

func AttributeTypes[T any](ctx context.Context) (map[string]attr.Type, error)

AttributeTypes returns a map of attribute types for the specified type T. T must be a struct and reflection is used to find exported fields of T with the `tfsdk` tag.

func AttributeTypesMust

func AttributeTypesMust[T any](ctx context.Context) map[string]attr.Type

func DiagnosticString

func DiagnosticString(d diag.Diagnostic) string

DiagnosticString formats a Diagnostic If there is no `Detail`, only prints summary, otherwise prints both.

func DiagnosticsError

func DiagnosticsError(diags diag.Diagnostics) error

DiagnosticsError returns an error containing all Diagnostic with SeverityError.

func ElementType

func ElementType[T any](_ context.Context) (attr.Type, error)

ElementType returns the element type of the specified type T. T must be a slice or map and reflection is used to find the element type.

func ElementTypeMust

func ElementTypeMust[T any](ctx context.Context) attr.Type

func Must

func Must[T any](x T, err error) T

Must is a generic implementation of the Go Must idiom [1, 2]. It panics if the provided error is non-nil and returns x otherwise.

func MustDiag

func MustDiag[T any](x T, diags diag.Diagnostics) T

MustDiag is a generic implementation of the Go Must idiom [1, 2]. It panics if the provided Diagnostics has errors and returns x otherwise.

Types

type BoolType

type BoolType struct {
	basetypes.BoolType
}

func (BoolType) Equal

func (t BoolType) Equal(o attr.Type) bool

func (BoolType) String

func (t BoolType) String() string

func (BoolType) ValueFromBool

func (BoolType) ValueFromTerraform

func (t BoolType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (BoolType) ValueType

func (t BoolType) ValueType(ctx context.Context) attr.Value

type BoolValue

type BoolValue struct {
	basetypes.BoolValue
}

func NewBoolNull

func NewBoolNull() BoolValue

func NewBoolPointerValue

func NewBoolPointerValue(s *bool) BoolValue

func NewBoolUnknown

func NewBoolUnknown() BoolValue

func NewBoolValue

func NewBoolValue(s bool) BoolValue

func (BoolValue) Equal

func (v BoolValue) Equal(o attr.Value) bool

func (*BoolValue) Get

func (v *BoolValue) Get() bool

Get returns the known Bool value. If Bool is null or unknown, returns false.

func (*BoolValue) GetPtr

func (v *BoolValue) GetPtr() *bool

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (BoolValue) IsKnown

func (v BoolValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*BoolValue) Set

func (v *BoolValue) Set(s bool)

Set sets the Bool value.

func (*BoolValue) SetNull

func (v *BoolValue) SetNull()

SetNull sets the Bool value to null.

func (*BoolValue) SetPtr

func (v *BoolValue) SetPtr(s *bool)

SetPtr sets a pointer to the Bool value.

func (*BoolValue) SetUnknown

func (v *BoolValue) SetUnknown()

SetUnknown sets the Bool value to unknown.

func (BoolValue) Type

func (v BoolValue) Type(ctx context.Context) attr.Type

type Float64Type

type Float64Type struct {
	basetypes.Float64Type
}

func (Float64Type) Equal

func (t Float64Type) Equal(o attr.Type) bool

func (Float64Type) String

func (t Float64Type) String() string

func (Float64Type) ValueFromTerraform

func (t Float64Type) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (Float64Type) ValueType

func (t Float64Type) ValueType(ctx context.Context) attr.Value

type Float64Value

type Float64Value struct {
	basetypes.Float64Value
}

func NewFloat64Null

func NewFloat64Null() Float64Value

func NewFloat64PointerValue

func NewFloat64PointerValue(s *float64) Float64Value

func NewFloat64Unknown

func NewFloat64Unknown() Float64Value

func NewFloat64Value

func NewFloat64Value(s float64) Float64Value

func (Float64Value) Equal

func (v Float64Value) Equal(o attr.Value) bool

func (*Float64Value) Get

func (v *Float64Value) Get() float64

Get returns the known Float64 value. If Float64 is null or unknown, returns 0.0.

func (*Float64Value) GetFloat32

func (v *Float64Value) GetFloat32() float32

GetFloat32 returns converted float64 to float32 value.

func (Float64Value) GetFloat32Ptr

func (v Float64Value) GetFloat32Ptr() *float32

GetFloat32Ptr returns a converted float64 to float32 pointer. If the value is null or unknown, nil is returned.

func (Float64Value) GetFloat64

func (v Float64Value) GetFloat64() float64

GetFloat64 returns the float64 value. This is a same func as Get.

func (Float64Value) GetFloat64Ptr

func (v Float64Value) GetFloat64Ptr() *float64

GetFloat64Ptr returns a float64 pointer. This is a same func as GetPtr. If the value is null or unknown, nil is returned.

func (*Float64Value) GetPtr

func (v *Float64Value) GetPtr() *float64

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (Float64Value) IsKnown

func (v Float64Value) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*Float64Value) Set

func (v *Float64Value) Set(s float64)

Set sets the Float64 value.

func (*Float64Value) SetFloat32

func (v *Float64Value) SetFloat32(s float32)

SetFloat32 sets a converted float32 to float64 value.

func (*Float64Value) SetFloat32Ptr

func (v *Float64Value) SetFloat32Ptr(s *float32)

SetFloat32Ptr sets a converted float32 to float64 pointer. If the pointer is nil, the value is set to null.

func (*Float64Value) SetFloat64

func (v *Float64Value) SetFloat64(s float64)

SetFloat64 sets a float64 value. This is a same func as Set.

func (*Float64Value) SetFloat64Ptr

func (v *Float64Value) SetFloat64Ptr(s *float64)

SetFloat64Ptr sets a float64 pointer. This is a same func as SetPtr.

func (*Float64Value) SetNull

func (v *Float64Value) SetNull()

SetNull sets the Float64 value to null.

func (*Float64Value) SetPtr

func (v *Float64Value) SetPtr(s *float64)

SetPtr sets a pointer to the Float64 value.

func (*Float64Value) SetUnknown

func (v *Float64Value) SetUnknown()

SetUnknown sets the Float64 value to unknown.

func (Float64Value) Type

func (v Float64Value) Type(ctx context.Context) attr.Type

type Int64Type

type Int64Type struct {
	basetypes.Int64Type
}

func (Int64Type) Equal

func (t Int64Type) Equal(o attr.Type) bool

func (Int64Type) String

func (t Int64Type) String() string

func (Int64Type) ValueFromTerraform

func (t Int64Type) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (Int64Type) ValueType

func (t Int64Type) ValueType(ctx context.Context) attr.Value

type Int64Value

type Int64Value struct {
	basetypes.Int64Value
}

func NewInt64Null

func NewInt64Null() Int64Value

func NewInt64PointerValue

func NewInt64PointerValue(s *int64) Int64Value

func NewInt64Unknown

func NewInt64Unknown() Int64Value

func NewInt64Value

func NewInt64Value(s int64) Int64Value

func (Int64Value) Equal

func (v Int64Value) Equal(o attr.Value) bool

func (*Int64Value) Get

func (v *Int64Value) Get() int64

Get returns the known Int64 value. If Int64 is null or unknown, returns 0.

func (Int64Value) GetInt

func (v Int64Value) GetInt() int

GetInt returns converted int64 to int value.

func (Int64Value) GetInt16

func (v Int64Value) GetInt16() int16

GetInt16 return converted int64 to int16 value.

func (Int64Value) GetInt16Ptr

func (v Int64Value) GetInt16Ptr() *int16

GetInt16Ptr returns a converted int64 to int16 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetInt32

func (v Int64Value) GetInt32() int32

GetInt32 returns converted int64 to int32 value.

func (Int64Value) GetInt32Ptr

func (v Int64Value) GetInt32Ptr() *int32

GetInt32Ptr returns a converted int64 to int32 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetInt64

func (v Int64Value) GetInt64() int64

GetInt64 returns int64 value. This is a same func as Get.

func (Int64Value) GetInt64Ptr

func (v Int64Value) GetInt64Ptr() *int64

GetInt64Ptr returns a pointer to the underlying int64 value.

func (Int64Value) GetInt8

func (v Int64Value) GetInt8() int8

GetInt8 return converted int64 to int8 value.

func (Int64Value) GetInt8Ptr

func (v Int64Value) GetInt8Ptr() *int8

GetInt8Ptr returns a converted int64 to int8 pointer. If the value is null or unknown, nil is returned.

func (Int64Value) GetIntPtr

func (v Int64Value) GetIntPtr() *int

GetIntPtr returns a converted int64 to int pointer. If the value is null or unknown, nil is returned.

func (*Int64Value) GetPtr

func (v *Int64Value) GetPtr() *int64

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (Int64Value) IsKnown

func (v Int64Value) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*Int64Value) Set

func (v *Int64Value) Set(s int64)

Set sets the Int64 value.

func (*Int64Value) SetInt

func (v *Int64Value) SetInt(s int)

SetInt sets the int64 value to the given int.

func (*Int64Value) SetInt16

func (v *Int64Value) SetInt16(s int16)

SetInt16 sets the int64 value to the given int16.

func (*Int64Value) SetInt16Ptr

func (v *Int64Value) SetInt16Ptr(s *int16)

SetInt16Ptr sets the int64 value to the given int16 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetInt32

func (v *Int64Value) SetInt32(s int32)

SetInt32 Sets the int64 value to the given int32.

func (*Int64Value) SetInt32Ptr

func (v *Int64Value) SetInt32Ptr(s *int32)

SetInt32Ptr sets the int64 value to the given int32 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetInt64

func (v *Int64Value) SetInt64(s int64)

SetInt64 sets the int64 value to the given int64. This is a same func as Set.

func (*Int64Value) SetInt64Ptr

func (v *Int64Value) SetInt64Ptr(s *int64)

SetInt64Ptr sets the int64 value to the given int64 pointer.

func (*Int64Value) SetInt8

func (v *Int64Value) SetInt8(s int8)

SetInt8 sets the int64 value to the given int8.

func (*Int64Value) SetInt8Ptr

func (v *Int64Value) SetInt8Ptr(s *int8)

SetInt8Ptr sets the int64 value to the given int8 pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetIntPtr

func (v *Int64Value) SetIntPtr(s *int)

SetIntPtr sets the int64 value to the given int pointer. If the pointer is nil, the value is set to null.

func (*Int64Value) SetNull

func (v *Int64Value) SetNull()

SetNull sets the Int64 value to null.

func (*Int64Value) SetPtr

func (v *Int64Value) SetPtr(s *int64)

SetPtr sets a pointer to the Int64 value.

func (*Int64Value) SetUnknown

func (v *Int64Value) SetUnknown()

SetUnknown sets the Int64 value to unknown.

func (Int64Value) Type

func (v Int64Value) Type(ctx context.Context) attr.Type

type ListNestedObjectTypeOf

type ListNestedObjectTypeOf[T any] struct {
	basetypes.ListType
}

ListNestedObjectTypeOf is the attribute type of a ListNestedObjectValueOf.

func NewListNestedObjectTypeOf

func NewListNestedObjectTypeOf[T any](ctx context.Context) ListNestedObjectTypeOf[T]

func (ListNestedObjectTypeOf[T]) Equal

func (t ListNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (ListNestedObjectTypeOf[T]) NewObjectPtr

func (t ListNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) NewObjectSlice

func (t ListNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, len, cap int) (any, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) NullValue

func (ListNestedObjectTypeOf[T]) String

func (t ListNestedObjectTypeOf[T]) String() string

func (ListNestedObjectTypeOf[T]) ValueFromList

func (ListNestedObjectTypeOf[T]) ValueFromObjectPtr

func (t ListNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) ValueFromObjectSlice

func (t ListNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (ListNestedObjectTypeOf[T]) ValueFromTerraform

func (t ListNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ListNestedObjectTypeOf[T]) ValueType

func (t ListNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type ListNestedObjectValueOf

type ListNestedObjectValueOf[T any] struct {
	basetypes.ListValue
}

ListNestedObjectValueOf represents a Terraform Plugin Framework List value whose elements are of type ObjectTypeOf.

func NewListNestedObjectValueOfNull

func NewListNestedObjectValueOfNull[T any](ctx context.Context) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfPtr

func NewListNestedObjectValueOfPtr[T any](ctx context.Context, t *T) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfSlice

func NewListNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfUnknown

func NewListNestedObjectValueOfUnknown[T any](ctx context.Context) ListNestedObjectValueOf[T]

func NewListNestedObjectValueOfValueSlice

func NewListNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) ListNestedObjectValueOf[T]

func (ListNestedObjectValueOf[T]) Equal

func (v ListNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (ListNestedObjectValueOf[T]) Get

func (v ListNestedObjectValueOf[T]) Get(ctx context.Context) ([]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a ListNestedObject.

func (ListNestedObjectValueOf[T]) IsKnown

func (v ListNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*ListNestedObjectValueOf[T]) Set

func (v *ListNestedObjectValueOf[T]) Set(ctx context.Context, slice []*T) diag.Diagnostics

Set returns a ListNestedObjectValueOf from a slice of pointers to the elements of a ListNestedObject.

func (*ListNestedObjectValueOf[T]) SetNull

func (v *ListNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*ListNestedObjectValueOf[T]) SetUnknown

func (v *ListNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (ListNestedObjectValueOf[T]) Type

type ListNestedType

type ListNestedType struct {
	basetypes.ListType
}

ListNestedType is the attribute type of a ListNestedValue.

func (ListNestedType) ElementType

func (t ListNestedType) ElementType() attr.Type

func (ListNestedType) Equal

func (t ListNestedType) Equal(o attr.Type) bool

func (ListNestedType) String

func (t ListNestedType) String() string

String returns a string representation of the type.

func (ListNestedType) TerraformType

func (t ListNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (ListNestedType) ValueFromList

func (ListNestedType) ValueFromTerraform

func (t ListNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type ListNestedValue

type ListNestedValue struct {
	basetypes.ListValue
}

func NewListNestedNull

func NewListNestedNull(elementType attr.Type) ListNestedValue

func NewListNestedUnknown

func NewListNestedUnknown(elementType attr.Type) ListNestedValue

func (*ListNestedValue) Get

func (v *ListNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (ListNestedValue) IsKnown

func (v ListNestedValue) IsKnown() bool

func (*ListNestedValue) Set

func (v *ListNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*ListNestedValue) SetNull

func (v *ListNestedValue) SetNull(ctx context.Context)

func (*ListNestedValue) SetUnknown

func (v *ListNestedValue) SetUnknown(ctx context.Context)

func (ListNestedValue) ToListValue

func (ListNestedValue) Type

func (v ListNestedValue) Type(ctx context.Context) attr.Type

type ListType

type ListType struct {
	basetypes.ListType
}

func (ListType) ElementType

func (t ListType) ElementType() attr.Type

func (ListType) Equal

func (t ListType) Equal(o attr.Type) bool

func (ListType) String

func (t ListType) String() string

func (ListType) TerraformType

func (t ListType) TerraformType(ctx context.Context) tftypes.Type

func (ListType) ValueFromList

func (ListType) ValueFromTerraform

func (t ListType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ListType) ValueType

func (t ListType) ValueType(ctx context.Context) attr.Value

type ListTypeOf

type ListTypeOf[T any] struct {
	basetypes.ListType
}

func NewListTypeOf

func NewListTypeOf[T any](ctx context.Context) ListTypeOf[T]

func (ListTypeOf[T]) ElementType

func (t ListTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this List.

func (ListTypeOf[T]) Equal

func (t ListTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (ListTypeOf[T]) String

func (t ListTypeOf[T]) String() string

String returns a string representation of the type.

func (ListTypeOf[T]) ValueFromList

ValueFromList converts a basetypes.ListValue to a ListValueOf.

func (ListTypeOf[T]) ValueFromTerraform

func (t ListTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a ListValueOf.

func (ListTypeOf[T]) ValueType

func (t ListTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this List.

type ListValue

type ListValue struct {
	basetypes.ListValue
}

func NewListNull

func NewListNull(elementType attr.Type) ListValue

func NewListUnknown

func NewListUnknown(elementType attr.Type) ListValue

func NewListValue

func NewListValue(elementType attr.Type, elements []attr.Value) (ListValue, diag.Diagnostics)

func NewListValueFrom

func NewListValueFrom(ctx context.Context, elementType attr.Type, elements any) (ListValue, diag.Diagnostics)

func NewListValueMust

func NewListValueMust(elementType attr.Type, elements []attr.Value) ListValue

func (ListValue) Equal

func (v ListValue) Equal(o attr.Value) bool

func (*ListValue) Get

func (v *ListValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (ListValue) IsKnown

func (v ListValue) IsKnown() bool

func (*ListValue) Set

func (v *ListValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*ListValue) SetNull

func (v *ListValue) SetNull(ctx context.Context)

func (*ListValue) SetUnknown

func (v *ListValue) SetUnknown(ctx context.Context)

func (ListValue) ToListValue

func (ListValue) Type

func (v ListValue) Type(ctx context.Context) attr.Type

type ListValueOf

type ListValueOf[T any] struct {
	basetypes.ListValue
}

func NewListValueOfNull

func NewListValueOfNull[T any](ctx context.Context) ListValueOf[T]

NewListValueOfNull returns a new ListValueOf with a null value.

func NewListValueOfSlice

func NewListValueOfSlice[T any](ctx context.Context, elements []T) ListValueOf[T]

NewListValueOfSlice returns a new ListValueOf with the given slice value.

func NewListValueOfSlicePtr

func NewListValueOfSlicePtr[T any](ctx context.Context, elements []*T) ListValueOf[T]

NewListValueOfSlicePtr returns a new ListValueOf with the given slice value.

func NewListValueOfUnknown

func NewListValueOfUnknown[T any](ctx context.Context) ListValueOf[T]

NewListValueOfUnknown returns a new ListValueOf with an unknown value.

func (ListValueOf[T]) Equal

func (v ListValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (ListValueOf[T]) Get

func (v ListValueOf[T]) Get(ctx context.Context) (values []T, diags diag.Diagnostics)

Get returns a ListValueOf from the given value.

func (ListValueOf[T]) IsKnown

func (v ListValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*ListValueOf[T]) Set

func (v *ListValueOf[T]) Set(ctx context.Context, elements []T) diag.Diagnostics

Set sets the value of this value.

func (*ListValueOf[T]) SetNull

func (v *ListValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*ListValueOf[T]) SetUnknown

func (v *ListValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (ListValueOf[T]) ToListValue

ToListValue converts the given value to a ListValue.

func (ListValueOf[T]) Type

func (v ListValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type MapNestedObjectTypeOf

type MapNestedObjectTypeOf[T any] struct {
	basetypes.MapType
}

MapNestedObjectTypeOf is the attribute type of a MapNestedObjectValueOf.

func NewMapNestedObjectTypeOf

func NewMapNestedObjectTypeOf[T any](ctx context.Context) MapNestedObjectTypeOf[T]

func (MapNestedObjectTypeOf[T]) Equal

func (t MapNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (MapNestedObjectTypeOf[T]) NewObjectPtr

func (t MapNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) NewObjectSlice

func (t MapNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, _, _ int) (any, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) NullValue

func (MapNestedObjectTypeOf[T]) String

func (t MapNestedObjectTypeOf[T]) String() string

func (MapNestedObjectTypeOf[T]) ValueFromMap

func (MapNestedObjectTypeOf[T]) ValueFromObjectPtr

func (t MapNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) ValueFromObjectSlice

func (t MapNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (MapNestedObjectTypeOf[T]) ValueFromTerraform

func (t MapNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (MapNestedObjectTypeOf[T]) ValueType

func (t MapNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type MapNestedObjectValueOf

type MapNestedObjectValueOf[T any] struct {
	basetypes.MapValue
}

MapNestedObjectValueOf represents a Terraform Plugin Framework Map value whose elements are of type ObjectTypeOf.

func NewMapNestedObjectValueOfMap

func NewMapNestedObjectValueOfMap[T any](ctx context.Context, m map[string]*T) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfNull

func NewMapNestedObjectValueOfNull[T any](ctx context.Context) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfPtr

func NewMapNestedObjectValueOfPtr[T any](ctx context.Context, m map[string]*T) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfUnknown

func NewMapNestedObjectValueOfUnknown[T any](ctx context.Context) MapNestedObjectValueOf[T]

func NewMapNestedObjectValueOfValueMap

func NewMapNestedObjectValueOfValueMap[T any](ctx context.Context, m map[string]T) MapNestedObjectValueOf[T]

func (MapNestedObjectValueOf[T]) Equal

func (v MapNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (MapNestedObjectValueOf[T]) Get

func (v MapNestedObjectValueOf[T]) Get(ctx context.Context) (map[string]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a MapNestedObject.

func (MapNestedObjectValueOf[T]) IsKnown

func (v MapNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*MapNestedObjectValueOf[T]) Set

func (v *MapNestedObjectValueOf[T]) Set(ctx context.Context, m map[string]*T) diag.Diagnostics

Set returns a MapNestedObjectValueOf from a slice of pointers to the elements of a MapNestedObject.

func (*MapNestedObjectValueOf[T]) SetNull

func (v *MapNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*MapNestedObjectValueOf[T]) SetUnknown

func (v *MapNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (MapNestedObjectValueOf[T]) Type

type MapNestedType

type MapNestedType struct {
	basetypes.MapType
}

MapNestedType is the attribute type of a MapNestedValue.

func (MapNestedType) ElementType

func (t MapNestedType) ElementType() attr.Type

func (MapNestedType) Equal

func (t MapNestedType) Equal(o attr.Type) bool

func (MapNestedType) String

func (t MapNestedType) String() string

String returns a string representation of the type.

func (MapNestedType) TerraformType

func (t MapNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (MapNestedType) ValueFromMap

func (MapNestedType) ValueFromTerraform

func (t MapNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type MapNestedValue

type MapNestedValue struct {
	basetypes.MapValue
}

func NewMapNestedNull

func NewMapNestedNull(elementType attr.Type) MapNestedValue

func NewMapNestedUnknown

func NewMapNestedUnknown(elementType attr.Type) MapNestedValue

func (*MapNestedValue) Get

func (v *MapNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (MapNestedValue) IsKnown

func (v MapNestedValue) IsKnown() bool

func (*MapNestedValue) Set

func (v *MapNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*MapNestedValue) SetNull

func (v *MapNestedValue) SetNull(ctx context.Context)

func (*MapNestedValue) SetUnknown

func (v *MapNestedValue) SetUnknown(ctx context.Context)

func (MapNestedValue) ToMapValue

func (MapNestedValue) Type

func (v MapNestedValue) Type(ctx context.Context) attr.Type

type MapType

type MapType struct {
	basetypes.MapType
}

func (MapType) ElementType

func (t MapType) ElementType() attr.Type

func (MapType) Equal

func (t MapType) Equal(o attr.Type) bool

func (MapType) String

func (t MapType) String() string

func (MapType) TerraformType

func (t MapType) TerraformType(ctx context.Context) tftypes.Type

func (MapType) ValueFromMap

func (MapType) ValueFromTerraform

func (t MapType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (MapType) ValueType

func (t MapType) ValueType(ctx context.Context) attr.Value

type MapTypeOf

type MapTypeOf[T any] struct {
	basetypes.MapType
}

func NewMapTypeOf

func NewMapTypeOf[T any](ctx context.Context) MapTypeOf[T]

func (MapTypeOf[T]) ElementType

func (t MapTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this Map.

func (MapTypeOf[T]) Equal

func (t MapTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (MapTypeOf[T]) String

func (t MapTypeOf[T]) String() string

String returns a string representation of the type.

func (MapTypeOf[T]) ValueFromMap

ValueFromMap converts a basetypes.MapValue to a MapValueOf.

func (MapTypeOf[T]) ValueFromTerraform

func (t MapTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a MapValueOf.

func (MapTypeOf[T]) ValueType

func (t MapTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this Map.

type MapValue

type MapValue struct {
	basetypes.MapValue
}

func NewMapNull

func NewMapNull(elementType attr.Type) MapValue

func NewMapUnknown

func NewMapUnknown(elementType attr.Type) MapValue

func NewMapValue

func NewMapValue(elementType attr.Type, elements map[string]attr.Value) (MapValue, diag.Diagnostics)

func NewMapValueFrom

func NewMapValueFrom(ctx context.Context, elementType attr.Type, elements any) (MapValue, diag.Diagnostics)

func NewMapValueMust

func NewMapValueMust(elementType attr.Type, elements map[string]attr.Value) MapValue

func (MapValue) Equal

func (v MapValue) Equal(o attr.Value) bool

func (*MapValue) Get

func (v *MapValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (MapValue) IsKnown

func (v MapValue) IsKnown() bool

func (*MapValue) Set

func (v *MapValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*MapValue) SetNull

func (v *MapValue) SetNull(ctx context.Context)

func (*MapValue) SetUnknown

func (v *MapValue) SetUnknown(ctx context.Context)

func (MapValue) ToMapValue

func (MapValue) Type

func (v MapValue) Type(ctx context.Context) attr.Type

type MapValueOf

type MapValueOf[T any] struct {
	basetypes.MapValue
}

func NewMapValueOfMap

func NewMapValueOfMap[T any](ctx context.Context, elements map[string]T) (MapValueOf[T], diag.Diagnostics)

NewMapValueOfMap returns a new MapValueOf with the given map value.

func NewMapValueOfNull

func NewMapValueOfNull[T any](ctx context.Context) MapValueOf[T]

NewMapValueOfNull returns a new MapValueOf with a null value.

func NewMapValueOfUnknown

func NewMapValueOfUnknown[T any](ctx context.Context) MapValueOf[T]

NewMapValueOfUnknown returns a new MapValueOf with an unknown value.

func (MapValueOf[T]) Equal

func (v MapValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (MapValueOf[T]) Get

func (v MapValueOf[T]) Get(ctx context.Context) (values map[string]T, diags diag.Diagnostics)

Get returns a MapValueOf from the given value.

func (MapValueOf[T]) IsKnown

func (v MapValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*MapValueOf[T]) Set

func (v *MapValueOf[T]) Set(ctx context.Context, elements map[string]T) diag.Diagnostics

Set sets the value of this value.

func (*MapValueOf[T]) SetNull

func (v *MapValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*MapValueOf[T]) SetUnknown

func (v *MapValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (MapValueOf[T]) ToMapValue

ToMapValue converts the given value to a MapValue.

func (MapValueOf[T]) Type

func (v MapValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type NestedObjectType

type NestedObjectType interface {
	attr.Type

	// NewObjectPtr returns a new, empty value as an object pointer (Go *struct).
	NewObjectPtr(context.Context) (any, diag.Diagnostics)

	// NewObjectSlice returns a new value as an object slice (Go []*struct).
	NewObjectSlice(context.Context, int, int) (any, diag.Diagnostics)

	// NullValue returns a Null Value.
	NullValue(context.Context) (attr.Value, diag.Diagnostics)

	// ValueFromObjectPtr returns a Value given an object pointer (Go *struct).
	ValueFromObjectPtr(context.Context, any) (attr.Value, diag.Diagnostics)

	// ValueFromObjectSlice returns a Value given an object pointer (Go []*struct).
	ValueFromObjectSlice(context.Context, any) (attr.Value, diag.Diagnostics)
}

NestedObjectType extends the Type interface for types that represent nested Objects.

type NestedObjectValue

type NestedObjectValue interface {
	attr.Value
}

NestedObjectValue extends the Value interface for values that represent nested Objects.

type NumberType

type NumberType struct {
	basetypes.NumberType
}

func (NumberType) Equal

func (t NumberType) Equal(o attr.Type) bool

func (NumberType) String

func (t NumberType) String() string

func (NumberType) ValueFromTerraform

func (t NumberType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (NumberType) ValueType

func (t NumberType) ValueType(ctx context.Context) attr.Value

type NumberValue

type NumberValue struct {
	basetypes.NumberValue
}

func NewNumberNull

func NewNumberNull() NumberValue

func NewNumberUnknown

func NewNumberUnknown() NumberValue

func NewNumberValue

func NewNumberValue(s *big.Float) NumberValue

func (NumberValue) Equal

func (v NumberValue) Equal(o attr.Value) bool

func (*NumberValue) Get

func (v *NumberValue) Get() *big.Float

Get returns the known Number value. If Number is null or unknown, returns 0.0.

func (NumberValue) IsKnown

func (v NumberValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*NumberValue) Set

func (v *NumberValue) Set(s *big.Float)

Set sets the Number value.

func (*NumberValue) SetNull

func (v *NumberValue) SetNull()

SetNull sets the Number value to null.

func (*NumberValue) SetUnknown

func (v *NumberValue) SetUnknown()

SetUnknown sets the Number value to unknown.

func (NumberValue) Type

func (v NumberValue) Type(ctx context.Context) attr.Type

type ObjectType

type ObjectType struct {
	basetypes.ObjectType
}

func (ObjectType) Equal

func (t ObjectType) Equal(o attr.Type) bool

func (ObjectType) String

func (t ObjectType) String() string

func (ObjectType) ValueFromTerraform

func (t ObjectType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ObjectType) ValueType

func (t ObjectType) ValueType(_ context.Context) attr.Value

type ObjectTypeOf

type ObjectTypeOf[T any] struct {
	basetypes.ObjectType
}

ObjectTypeOf is the attribute type of an ObjectValueOf.

func NewObjectTypeOf

func NewObjectTypeOf[T any](ctx context.Context) ObjectTypeOf[T]

func (ObjectTypeOf[T]) Equal

func (t ObjectTypeOf[T]) Equal(o attr.Type) bool

func (ObjectTypeOf[T]) String

func (t ObjectTypeOf[T]) String() string

func (ObjectTypeOf[T]) ValueFromObject

func (ObjectTypeOf[T]) ValueFromTerraform

func (t ObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (ObjectTypeOf[T]) ValueType

func (t ObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type ObjectValue

type ObjectValue struct {
	basetypes.ObjectValue
}

func NewObjectNull

func NewObjectNull(attributeTypes map[string]attr.Type) ObjectValue

func NewObjectUnknown

func NewObjectUnknown(attributeTypes map[string]attr.Type) ObjectValue

func (ObjectValue) Equal

func (v ObjectValue) Equal(o attr.Value) bool

func (*ObjectValue) Get

func (v *ObjectValue) Get(ctx context.Context, target interface{}, opts basetypes.ObjectAsOptions) diag.Diagnostics

func (ObjectValue) IsKnown

func (v ObjectValue) IsKnown() bool

func (*ObjectValue) Set

func (v *ObjectValue) Set(ctx context.Context, structure any) diag.Diagnostics

func (*ObjectValue) SetNull

func (v *ObjectValue) SetNull(ctx context.Context)

func (*ObjectValue) SetUnknown

func (v *ObjectValue) SetUnknown(ctx context.Context)

func (ObjectValue) Type

func (v ObjectValue) Type(_ context.Context) attr.Type

type ObjectValueOf

type ObjectValueOf[T any] struct {
	basetypes.ObjectValue
}

ObjectValueOf represents a Terraform Plugin Framework Object value whose corresponding Go type is the structure T.

func NewObjectValueOf

func NewObjectValueOf[T any](ctx context.Context, t *T) ObjectValueOf[T]

func NewObjectValueOfNull

func NewObjectValueOfNull[T any](ctx context.Context) ObjectValueOf[T]

func NewObjectValueOfUnknown

func NewObjectValueOfUnknown[T any](ctx context.Context) ObjectValueOf[T]

func (ObjectValueOf[T]) Equal

func (v ObjectValueOf[T]) Equal(o attr.Value) bool

func (ObjectValueOf[T]) Get

func (v ObjectValueOf[T]) Get(ctx context.Context) (*T, diag.Diagnostics)

func (ObjectValueOf[T]) IsKnown

func (v ObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*ObjectValueOf[T]) Set

func (v *ObjectValueOf[T]) Set(ctx context.Context, t *T) (diags diag.Diagnostics)

func (*ObjectValueOf[T]) SetNull

func (v *ObjectValueOf[T]) SetNull(ctx context.Context)

func (*ObjectValueOf[T]) SetUnknown

func (v *ObjectValueOf[T]) SetUnknown(ctx context.Context)

func (ObjectValueOf[T]) Type

func (v ObjectValueOf[T]) Type(ctx context.Context) attr.Type

type SetNestedObjectTypeOf

type SetNestedObjectTypeOf[T any] struct {
	basetypes.SetType
}

SetNestedObjectTypeOf is the attribute type of a SetNestedObjectValueOf.

func NewSetNestedObjectTypeOf

func NewSetNestedObjectTypeOf[T any](ctx context.Context) SetNestedObjectTypeOf[T]

func (SetNestedObjectTypeOf[T]) Equal

func (t SetNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (SetNestedObjectTypeOf[T]) NewObjectPtr

func (t SetNestedObjectTypeOf[T]) NewObjectPtr(ctx context.Context) (any, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) NewObjectSlice

func (t SetNestedObjectTypeOf[T]) NewObjectSlice(ctx context.Context, len, cap int) (any, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) NullValue

func (SetNestedObjectTypeOf[T]) String

func (t SetNestedObjectTypeOf[T]) String() string

func (SetNestedObjectTypeOf[T]) ValueFromObjectPtr

func (t SetNestedObjectTypeOf[T]) ValueFromObjectPtr(ctx context.Context, ptr any) (attr.Value, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) ValueFromObjectSlice

func (t SetNestedObjectTypeOf[T]) ValueFromObjectSlice(ctx context.Context, slice any) (attr.Value, diag.Diagnostics)

func (SetNestedObjectTypeOf[T]) ValueFromSet

func (SetNestedObjectTypeOf[T]) ValueFromTerraform

func (t SetNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SetNestedObjectTypeOf[T]) ValueType

func (t SetNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type SetNestedObjectValueOf

type SetNestedObjectValueOf[T any] struct {
	basetypes.SetValue
}

SetNestedObjectValueOf represents a Terraform Plugin Framework Set value whose elements are of type ObjectTypeOf.

func NewSetNestedObjectValueOfNull

func NewSetNestedObjectValueOfNull[T any](ctx context.Context) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfPtr

func NewSetNestedObjectValueOfPtr[T any](ctx context.Context, t *T) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfSlice

func NewSetNestedObjectValueOfSlice[T any](ctx context.Context, ts []*T) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfUnknown

func NewSetNestedObjectValueOfUnknown[T any](ctx context.Context) SetNestedObjectValueOf[T]

func NewSetNestedObjectValueOfValueSlice

func NewSetNestedObjectValueOfValueSlice[T any](ctx context.Context, ts []T) SetNestedObjectValueOf[T]

func (SetNestedObjectValueOf[T]) Equal

func (v SetNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (SetNestedObjectValueOf[T]) Get

func (v SetNestedObjectValueOf[T]) Get(ctx context.Context) ([]*T, diag.Diagnostics)

Get returns a slice of pointers to the elements of a SetNestedObject.

func (SetNestedObjectValueOf[T]) IsKnown

func (v SetNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*SetNestedObjectValueOf[T]) Set

func (v *SetNestedObjectValueOf[T]) Set(ctx context.Context, slice []*T) diag.Diagnostics

Set returns a SetNestedObjectValueOf from a slice of pointers to the elements of a SetNestedObject.

func (*SetNestedObjectValueOf[T]) SetNull

func (v *SetNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*SetNestedObjectValueOf[T]) SetUnknown

func (v *SetNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (SetNestedObjectValueOf[T]) Type

type SetNestedType

type SetNestedType struct {
	basetypes.SetType
}

SetNestedType is the attribute type of a SetNestedValue.

func (SetNestedType) ElementType

func (t SetNestedType) ElementType() attr.Type

func (SetNestedType) Equal

func (t SetNestedType) Equal(o attr.Type) bool

func (SetNestedType) String

func (t SetNestedType) String() string

String returns a string representation of the type.

func (SetNestedType) TerraformType

func (t SetNestedType) TerraformType(ctx context.Context) tftypes.Type

TerraformType returns the tftypes.Type that should be used to represent this type. This constrains what user input will be accepted and what kind of data can be set in state. The framework will use this to translate the AttributeType to something Terraform can understand.

func (SetNestedType) ValueFromSet

func (SetNestedType) ValueFromTerraform

func (t SetNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type SetNestedValue

type SetNestedValue struct {
	basetypes.SetValue
}

func NewSetNestedNull

func NewSetNestedNull(elementType attr.Type) SetNestedValue

func NewSetNestedUnknown

func NewSetNestedUnknown(elementType attr.Type) SetNestedValue

func (*SetNestedValue) Get

func (v *SetNestedValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (SetNestedValue) IsKnown

func (v SetNestedValue) IsKnown() bool

func (*SetNestedValue) Set

func (v *SetNestedValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*SetNestedValue) SetNull

func (v *SetNestedValue) SetNull(ctx context.Context)

func (*SetNestedValue) SetUnknown

func (v *SetNestedValue) SetUnknown(ctx context.Context)

func (SetNestedValue) ToSetValue

func (SetNestedValue) Type

func (v SetNestedValue) Type(ctx context.Context) attr.Type

type SetType

type SetType struct {
	basetypes.SetType
}

func (SetType) ElementType

func (t SetType) ElementType() attr.Type

func (SetType) Equal

func (t SetType) Equal(o attr.Type) bool

func (SetType) String

func (t SetType) String() string

func (SetType) TerraformType

func (t SetType) TerraformType(ctx context.Context) tftypes.Type

func (SetType) ValueFromSet

func (SetType) ValueFromTerraform

func (t SetType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SetType) ValueType

func (t SetType) ValueType(ctx context.Context) attr.Value

type SetTypeOf

type SetTypeOf[T any] struct {
	basetypes.SetType
}

func NewSetTypeOf

func NewSetTypeOf[T any](ctx context.Context) SetTypeOf[T]

func (SetTypeOf[T]) ElementType

func (t SetTypeOf[T]) ElementType() attr.Type

ElementType returns the element type of this Set.

func (SetTypeOf[T]) Equal

func (t SetTypeOf[T]) Equal(o attr.Type) bool

Equal returns true if the given type is equal to this type.

func (SetTypeOf[T]) String

func (t SetTypeOf[T]) String() string

String returns a string representation of the type.

func (SetTypeOf[T]) ValueFromSet

ValueFromSet converts a basetypes.SetValue to a SetValueOf.

func (SetTypeOf[T]) ValueFromTerraform

func (t SetTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

ValueFromTerraform converts a tftypes.Value to a SetValueOf.

func (SetTypeOf[T]) ValueType

func (t SetTypeOf[T]) ValueType(ctx context.Context) attr.Value

ValueType returns the value type of this Set.

type SetValue

type SetValue struct {
	basetypes.SetValue
}

func NewSetNull

func NewSetNull(elementType attr.Type) SetValue

func NewSetUnknown

func NewSetUnknown(elementType attr.Type) SetValue

func NewSetValue

func NewSetValue(elementType attr.Type, elements []attr.Value) (SetValue, diag.Diagnostics)

func NewSetValueFrom

func NewSetValueFrom(ctx context.Context, elementType attr.Type, elements any) (SetValue, diag.Diagnostics)

func NewSetValueMust

func NewSetValueMust(elementType attr.Type, elements []attr.Value) SetValue

func (SetValue) Equal

func (v SetValue) Equal(o attr.Value) bool

func (*SetValue) Get

func (v *SetValue) Get(ctx context.Context, target interface{}, allowUnhandled bool) (diag diag.Diagnostics)

func (SetValue) IsKnown

func (v SetValue) IsKnown() bool

func (*SetValue) Set

func (v *SetValue) Set(ctx context.Context, elements any) diag.Diagnostics

func (*SetValue) SetNull

func (v *SetValue) SetNull(ctx context.Context)

func (*SetValue) SetUnknown

func (v *SetValue) SetUnknown(ctx context.Context)

func (SetValue) ToSetValue

func (SetValue) Type

func (v SetValue) Type(ctx context.Context) attr.Type

type SetValueOf

type SetValueOf[T any] struct {
	basetypes.SetValue
}

func NewSetValueOfNull

func NewSetValueOfNull[T any](ctx context.Context) SetValueOf[T]

NewSetValueOfNull returns a new SetValueOf with a null value.

func NewSetValueOfSlice

func NewSetValueOfSlice[T any](ctx context.Context, elements []T) SetValueOf[T]

NewSetValueOfSlice returns a new SetValueOf with the given slice value.

func NewSetValueOfSlicePtr

func NewSetValueOfSlicePtr[T any](ctx context.Context, elements []*T) SetValueOf[T]

NewSetValueOfSlicePtr returns a new SetValueOf with the given slice value.

func NewSetValueOfUnknown

func NewSetValueOfUnknown[T any](ctx context.Context) SetValueOf[T]

NewSetValueOfUnknown returns a new SetValueOf with an unknown value.

func (SetValueOf[T]) Equal

func (v SetValueOf[T]) Equal(o attr.Value) bool

Equal returns true if the given value is equal to this value.

func (SetValueOf[T]) Get

func (v SetValueOf[T]) Get(ctx context.Context) (values []T, diags diag.Diagnostics)

Get returns a SetValueOf from the given value.

func (SetValueOf[T]) IsKnown

func (v SetValueOf[T]) IsKnown() bool

IsKnown returns true if the value is known.

func (*SetValueOf[T]) Set

func (v *SetValueOf[T]) Set(ctx context.Context, elements []T) diag.Diagnostics

Set sets the value of this value.

func (*SetValueOf[T]) SetNull

func (v *SetValueOf[T]) SetNull(ctx context.Context)

SetNull sets the value to null.

func (*SetValueOf[T]) SetUnknown

func (v *SetValueOf[T]) SetUnknown(ctx context.Context)

SetUnknown sets the value to unknown.

func (SetValueOf[T]) ToSetValue

ToSetValue converts the given value to a SetValue.

func (SetValueOf[T]) Type

func (v SetValueOf[T]) Type(ctx context.Context) attr.Type

Type returns the type of this value.

type SingleNestedObjectTypeOf

type SingleNestedObjectTypeOf[T any] struct {
	basetypes.ObjectType
}

func NewSingleNestedObjectTypeOf

func NewSingleNestedObjectTypeOf[T any](ctx context.Context) SingleNestedObjectTypeOf[T]

func (SingleNestedObjectTypeOf[T]) Equal

func (t SingleNestedObjectTypeOf[T]) Equal(o attr.Type) bool

func (SingleNestedObjectTypeOf[T]) String

func (t SingleNestedObjectTypeOf[T]) String() string

func (SingleNestedObjectTypeOf[T]) ValueFromObject

func (SingleNestedObjectTypeOf[T]) ValueFromTerraform

func (t SingleNestedObjectTypeOf[T]) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (SingleNestedObjectTypeOf[T]) ValueType

func (t SingleNestedObjectTypeOf[T]) ValueType(ctx context.Context) attr.Value

type SingleNestedObjectValueOf

type SingleNestedObjectValueOf[T any] struct {
	basetypes.ObjectValue
}

SingleNestedObjectValueOf represents a Terraform Plugin Framework Single value whose corresponding Go type is the structure T.

func NewSingleNestedObjectValueOf

func NewSingleNestedObjectValueOf[T any](ctx context.Context, t *T) SingleNestedObjectValueOf[T]

func NewSingleNestedObjectValueOfNull

func NewSingleNestedObjectValueOfNull[T any](ctx context.Context) SingleNestedObjectValueOf[T]

func NewSingleNestedObjectValueOfUnknown

func NewSingleNestedObjectValueOfUnknown[T any](ctx context.Context) SingleNestedObjectValueOf[T]

func (SingleNestedObjectValueOf[T]) Equal

func (v SingleNestedObjectValueOf[T]) Equal(o attr.Value) bool

func (SingleNestedObjectValueOf[T]) Get

func (SingleNestedObjectValueOf[T]) IsKnown

func (v SingleNestedObjectValueOf[T]) IsKnown() bool

IsKnown returns whether the value is known.

func (*SingleNestedObjectValueOf[T]) Set

func (v *SingleNestedObjectValueOf[T]) Set(ctx context.Context, t *T) (diags diag.Diagnostics)

func (*SingleNestedObjectValueOf[T]) SetNull

func (v *SingleNestedObjectValueOf[T]) SetNull(ctx context.Context)

func (*SingleNestedObjectValueOf[T]) SetUnknown

func (v *SingleNestedObjectValueOf[T]) SetUnknown(ctx context.Context)

func (SingleNestedObjectValueOf[T]) Type

type SingleNestedType

type SingleNestedType struct {
	basetypes.ObjectType
}

func (SingleNestedType) Equal

func (t SingleNestedType) Equal(o attr.Type) bool

func (SingleNestedType) String

func (t SingleNestedType) String() string

func (SingleNestedType) ValueFromObject

func (SingleNestedType) ValueFromTerraform

func (t SingleNestedType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

type SingleNestedValue

type SingleNestedValue struct {
	basetypes.ObjectValue
}

func NewSingleNestedNull

func NewSingleNestedNull(attributeTypes map[string]attr.Type) SingleNestedValue

func NewSingleNestedUnknown

func NewSingleNestedUnknown(attributeTypes map[string]attr.Type) SingleNestedValue

func (*SingleNestedValue) Get

func (v *SingleNestedValue) Get(ctx context.Context, target interface{}, opts basetypes.ObjectAsOptions) (diag diag.Diagnostics)

func (SingleNestedValue) IsKnown

func (v SingleNestedValue) IsKnown() bool

func (*SingleNestedValue) Set

func (v *SingleNestedValue) Set(ctx context.Context, structure any) diag.Diagnostics

func (*SingleNestedValue) SetNull

func (v *SingleNestedValue) SetNull(ctx context.Context)

func (*SingleNestedValue) SetUnknown

func (v *SingleNestedValue) SetUnknown(ctx context.Context)

func (SingleNestedValue) ToObjectValue

func (SingleNestedValue) Type

type StringType

type StringType struct {
	basetypes.StringType
}

func (StringType) Equal

func (t StringType) Equal(o attr.Type) bool

func (StringType) String

func (t StringType) String() string

func (StringType) ValueFromTerraform

func (t StringType) ValueFromTerraform(ctx context.Context, in tftypes.Value) (attr.Value, error)

func (StringType) ValueType

func (t StringType) ValueType(ctx context.Context) attr.Value

type StringValue

type StringValue struct {
	basetypes.StringValue
}

func NewStringNull

func NewStringNull() StringValue

func NewStringPointerValue

func NewStringPointerValue(s *string) StringValue

func NewStringUnknown

func NewStringUnknown() StringValue

func NewStringValue

func NewStringValue(s string) StringValue

func (StringValue) Equal

func (v StringValue) Equal(o attr.Value) bool

func (*StringValue) Get

func (v *StringValue) Get() string

Get returns the known String value. If String is null or unknown, returns "".

func (*StringValue) GetPtr

func (v *StringValue) GetPtr() *string

GetPtr returns a pointer to the known int64 value, nil for a null value, or a pointer to 0 for an unknown value.

func (StringValue) IsKnown

func (v StringValue) IsKnown() bool

IsKnown returns true if the value is not null and not unknown.

func (*StringValue) Set

func (v *StringValue) Set(s string)

Set sets the String value.

func (*StringValue) SetNull

func (v *StringValue) SetNull()

SetNull sets the String value to null.

func (*StringValue) SetPtr

func (v *StringValue) SetPtr(s *string)

SetPtr sets a pointer to the String value.

func (*StringValue) SetUnknown

func (v *StringValue) SetUnknown()

SetUnknown sets the String value to unknown.

func (StringValue) Type

func (v StringValue) Type(ctx context.Context) attr.Type

Jump to

Keyboard shortcuts

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