attribute_definition

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2024 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAttributeDefinition

func DeleteAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, id string) diag.Diagnostic

func NewResource

func NewResource() resource.Resource

func ToRestrictionsDto added in v0.2.0

func ToRestrictionsDto(r *Restrictions) *pim.RestrictionsDto

Types

type AttributeDefinition

type AttributeDefinition struct {
	Id             types.String  `tfsdk:"id"`
	Name           types.String  `tfsdk:"name"`
	Number         types.String  `tfsdk:"number"`
	Description    types.String  `tfsdk:"description"`
	DataType       types.String  `tfsdk:"data_type"`
	ContentType    types.String  `tfsdk:"content_type"`
	CharacterSet   types.String  `tfsdk:"character_set"`
	ExternalSource types.Bool    `tfsdk:"external_source"`
	GroupID        types.String  `tfsdk:"group_id"`
	Internal       types.Bool    `tfsdk:"internal"`
	Unit           types.String  `tfsdk:"unit"`
	Restrictions   *Restrictions `tfsdk:"restrictions"`
}

type EnumRestriction added in v0.2.0

type EnumRestriction struct {
	Type   types.String `tfsdk:"type"`
	Values *[]EnumValue `tfsdk:"values"`
}

type EnumValue added in v0.2.0

type EnumValue struct {
	Metadata types.String `tfsdk:"metadata"`
	Number   types.String `tfsdk:"number"`
	Value    types.String `tfsdk:"value"`
	ValueId  types.String `tfsdk:"value_id"`
}

type RangeRestriction added in v0.2.0

type RangeRestriction struct {
	Max  types.String `tfsdk:"max"`
	Min  types.String `tfsdk:"min"`
	Step types.String `tfsdk:"step"`
}

type Resource

type Resource struct {
	// contains filtered or unexported fields
}

func (*Resource) Configure

Configure adds the provider configured client to the data source.

func (*Resource) Create

Create creates the resource and sets the initial Terraform state.

func (*Resource) Delete

Delete deletes the resource and removes the Terraform state on success.

func (*Resource) ImportState

func (*Resource) Metadata

Metadata returns the data source type name.

func (*Resource) Read

Read refreshes the Terraform state with the latest data.

func (*Resource) Schema

Schema defines the schema for the data source.

func (*Resource) Update

Update updates the resource and sets the updated Terraform state on success.

type Restrictions added in v0.2.0

type Restrictions struct {
	Enum  *EnumRestriction  `tfsdk:"enum"`
	Range *RangeRestriction `tfsdk:"range"`
	Text  *TextRestriction  `tfsdk:"text"`
}

func FromRestrictionsDto added in v0.2.0

func FromRestrictionsDto(restrictions *pim.RestrictionsDto) *Restrictions

type TextRestriction added in v0.2.0

type TextRestriction struct {
	MaxLength   types.Int32  `tfsdk:"max_length"`
	Pattern     types.String `tfsdk:"pattern"`
	Whitespaces types.Bool   `tfsdk:"whitespaces"`
}

Jump to

Keyboard shortcuts

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