Documentation ¶
Index ¶
- func DeleteAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, id string) diag.Diagnostic
- func NewResource() resource.Resource
- func ToRestrictionsDto(r *Restrictions) *pim.RestrictionsDto
- type AttributeDefinition
- func CreateAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, ...) (*AttributeDefinition, diag.Diagnostic)
- func GetAttributeDefinitionByID(ctx context.Context, client pim.ClientWithResponsesInterface, id string) (*AttributeDefinition, diag.Diagnostic)
- func UpdateAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, ...) (*AttributeDefinition, diag.Diagnostic)
- type EnumRestriction
- type EnumValue
- type RangeRestriction
- type Resource
- func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, ...)
- func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
- func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
- func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, ...)
- func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, ...)
- func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
- func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
- func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
- type Restrictions
- type TextRestriction
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 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"` }
func CreateAttributeDefinition ¶
func CreateAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, resource *AttributeDefinition) (*AttributeDefinition, diag.Diagnostic)
func GetAttributeDefinitionByID ¶
func GetAttributeDefinitionByID(ctx context.Context, client pim.ClientWithResponsesInterface, id string) (*AttributeDefinition, diag.Diagnostic)
func UpdateAttributeDefinition ¶
func UpdateAttributeDefinition(ctx context.Context, client pim.ClientWithResponsesInterface, current *AttributeDefinition, planned *AttributeDefinition) (*AttributeDefinition, diag.Diagnostic)
type EnumRestriction ¶ added in v0.2.0
type RangeRestriction ¶ added in v0.2.0
type Resource ¶
type Resource struct {
// contains filtered or unexported fields
}
func (*Resource) Configure ¶
func (r *Resource) Configure(_ context.Context, req resource.ConfigureRequest, resp *resource.ConfigureResponse)
Configure adds the provider configured client to the data source.
func (*Resource) Create ¶
func (r *Resource) Create(ctx context.Context, req resource.CreateRequest, resp *resource.CreateResponse)
Create creates the resource and sets the initial Terraform state.
func (*Resource) Delete ¶
func (r *Resource) Delete(ctx context.Context, req resource.DeleteRequest, resp *resource.DeleteResponse)
Delete deletes the resource and removes the Terraform state on success.
func (*Resource) ImportState ¶
func (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) Metadata ¶
func (r *Resource) Metadata(_ context.Context, req resource.MetadataRequest, resp *resource.MetadataResponse)
Metadata returns the data source type name.
func (*Resource) Read ¶
func (r *Resource) Read(ctx context.Context, req resource.ReadRequest, resp *resource.ReadResponse)
Read refreshes the Terraform state with the latest data.
func (*Resource) Schema ¶
func (r *Resource) Schema(_ context.Context, _ resource.SchemaRequest, resp *resource.SchemaResponse)
Schema defines the schema for the data source.
func (*Resource) Update ¶
func (r *Resource) Update(ctx context.Context, req resource.UpdateRequest, resp *resource.UpdateResponse)
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
Click to show internal directories.
Click to hide internal directories.