terraform-provider-stackitp.../pkg/runcommandbeta/model_field.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## Description

<!-- **Please link some issue here describing what you are trying to achieve.**

In case there is no issue present for your PR, please consider creating one.
At least please give us some description what you are trying to achieve and why your change is needed. -->

relates to #1234

## Checklist

- [ ] Issue was linked above
- [ ] Code format was applied: `make fmt`
- [ ] Examples were added / adjusted (see `examples/` directory)
- [x] Docs are up-to-date: `make generate-docs` (will be checked by CI)
- [ ] Unit tests got implemented or updated
- [ ] Acceptance tests got implemented or updated (see e.g. [here](f5f99d1709/stackit/internal/services/dns/dns_acc_test.go))
- [x] Unit tests are passing: `make test` (will be checked by CI)
- [x] No linter issues: `make lint` (will be checked by CI)

Reviewed-on: #4
Reviewed-by: Andre_Harms <andre.harms@stackit.cloud>
Co-authored-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
Co-committed-by: Marcel S. Henselin <marcel.henselin@stackit.cloud>
2026-01-29 14:10:25 +00:00

415 lines
11 KiB
Go

/*
STACKIT Run Commands Service API
API endpoints for the STACKIT Run Commands Service API
API version: 2beta.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package runcommandbeta
import (
"encoding/json"
)
// checks if the Field type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Field{}
/*
types and functions for default
*/
// isNotNullableString
type FieldGetDefaultAttributeType = *string
func getFieldGetDefaultAttributeTypeOk(arg FieldGetDefaultAttributeType) (ret FieldGetDefaultRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetDefaultAttributeType(arg *FieldGetDefaultAttributeType, val FieldGetDefaultRetType) {
*arg = &val
}
type FieldGetDefaultArgType = string
type FieldGetDefaultRetType = string
/*
types and functions for description
*/
// isNotNullableString
type FieldGetDescriptionAttributeType = *string
func getFieldGetDescriptionAttributeTypeOk(arg FieldGetDescriptionAttributeType) (ret FieldGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetDescriptionAttributeType(arg *FieldGetDescriptionAttributeType, val FieldGetDescriptionRetType) {
*arg = &val
}
type FieldGetDescriptionArgType = string
type FieldGetDescriptionRetType = string
/*
types and functions for maxLen
*/
// isInteger
type FieldGetMaxLenAttributeType = *int64
type FieldGetMaxLenArgType = int64
type FieldGetMaxLenRetType = int64
func getFieldGetMaxLenAttributeTypeOk(arg FieldGetMaxLenAttributeType) (ret FieldGetMaxLenRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetMaxLenAttributeType(arg *FieldGetMaxLenAttributeType, val FieldGetMaxLenRetType) {
*arg = &val
}
/*
types and functions for minLen
*/
// isInteger
type FieldGetMinLenAttributeType = *int64
type FieldGetMinLenArgType = int64
type FieldGetMinLenRetType = int64
func getFieldGetMinLenAttributeTypeOk(arg FieldGetMinLenAttributeType) (ret FieldGetMinLenRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetMinLenAttributeType(arg *FieldGetMinLenAttributeType, val FieldGetMinLenRetType) {
*arg = &val
}
/*
types and functions for readOnly
*/
// isBoolean
type FieldgetReadOnlyAttributeType = *bool
type FieldgetReadOnlyArgType = bool
type FieldgetReadOnlyRetType = bool
func getFieldgetReadOnlyAttributeTypeOk(arg FieldgetReadOnlyAttributeType) (ret FieldgetReadOnlyRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldgetReadOnlyAttributeType(arg *FieldgetReadOnlyAttributeType, val FieldgetReadOnlyRetType) {
*arg = &val
}
/*
types and functions for title
*/
// isNotNullableString
type FieldGetTitleAttributeType = *string
func getFieldGetTitleAttributeTypeOk(arg FieldGetTitleAttributeType) (ret FieldGetTitleRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetTitleAttributeType(arg *FieldGetTitleAttributeType, val FieldGetTitleRetType) {
*arg = &val
}
type FieldGetTitleArgType = string
type FieldGetTitleRetType = string
/*
types and functions for type
*/
// isNotNullableString
type FieldGetTypeAttributeType = *string
func getFieldGetTypeAttributeTypeOk(arg FieldGetTypeAttributeType) (ret FieldGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setFieldGetTypeAttributeType(arg *FieldGetTypeAttributeType, val FieldGetTypeRetType) {
*arg = &val
}
type FieldGetTypeArgType = string
type FieldGetTypeRetType = string
// Field struct for Field
type Field struct {
Default FieldGetDefaultAttributeType `json:"default,omitempty"`
Description FieldGetDescriptionAttributeType `json:"description,omitempty"`
// Can be cast to int32 without loss of precision.
MaxLen FieldGetMaxLenAttributeType `json:"maxLen,omitempty"`
// Can be cast to int32 without loss of precision.
MinLen FieldGetMinLenAttributeType `json:"minLen,omitempty"`
ReadOnly FieldgetReadOnlyAttributeType `json:"readOnly,omitempty"`
Title FieldGetTitleAttributeType `json:"title,omitempty"`
Type FieldGetTypeAttributeType `json:"type,omitempty"`
}
// NewField instantiates a new Field object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewField() *Field {
this := Field{}
return &this
}
// NewFieldWithDefaults instantiates a new Field object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewFieldWithDefaults() *Field {
this := Field{}
return &this
}
// GetDefault returns the Default field value if set, zero value otherwise.
func (o *Field) GetDefault() (res FieldGetDefaultRetType) {
res, _ = o.GetDefaultOk()
return
}
// GetDefaultOk returns a tuple with the Default field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetDefaultOk() (ret FieldGetDefaultRetType, ok bool) {
return getFieldGetDefaultAttributeTypeOk(o.Default)
}
// HasDefault returns a boolean if a field has been set.
func (o *Field) HasDefault() bool {
_, ok := o.GetDefaultOk()
return ok
}
// SetDefault gets a reference to the given string and assigns it to the Default field.
func (o *Field) SetDefault(v FieldGetDefaultRetType) {
setFieldGetDefaultAttributeType(&o.Default, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *Field) GetDescription() (res FieldGetDescriptionRetType) {
res, _ = o.GetDescriptionOk()
return
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetDescriptionOk() (ret FieldGetDescriptionRetType, ok bool) {
return getFieldGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *Field) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *Field) SetDescription(v FieldGetDescriptionRetType) {
setFieldGetDescriptionAttributeType(&o.Description, v)
}
// GetMaxLen returns the MaxLen field value if set, zero value otherwise.
func (o *Field) GetMaxLen() (res FieldGetMaxLenRetType) {
res, _ = o.GetMaxLenOk()
return
}
// GetMaxLenOk returns a tuple with the MaxLen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetMaxLenOk() (ret FieldGetMaxLenRetType, ok bool) {
return getFieldGetMaxLenAttributeTypeOk(o.MaxLen)
}
// HasMaxLen returns a boolean if a field has been set.
func (o *Field) HasMaxLen() bool {
_, ok := o.GetMaxLenOk()
return ok
}
// SetMaxLen gets a reference to the given int64 and assigns it to the MaxLen field.
func (o *Field) SetMaxLen(v FieldGetMaxLenRetType) {
setFieldGetMaxLenAttributeType(&o.MaxLen, v)
}
// GetMinLen returns the MinLen field value if set, zero value otherwise.
func (o *Field) GetMinLen() (res FieldGetMinLenRetType) {
res, _ = o.GetMinLenOk()
return
}
// GetMinLenOk returns a tuple with the MinLen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetMinLenOk() (ret FieldGetMinLenRetType, ok bool) {
return getFieldGetMinLenAttributeTypeOk(o.MinLen)
}
// HasMinLen returns a boolean if a field has been set.
func (o *Field) HasMinLen() bool {
_, ok := o.GetMinLenOk()
return ok
}
// SetMinLen gets a reference to the given int64 and assigns it to the MinLen field.
func (o *Field) SetMinLen(v FieldGetMinLenRetType) {
setFieldGetMinLenAttributeType(&o.MinLen, v)
}
// GetReadOnly returns the ReadOnly field value if set, zero value otherwise.
func (o *Field) GetReadOnly() (res FieldgetReadOnlyRetType) {
res, _ = o.GetReadOnlyOk()
return
}
// GetReadOnlyOk returns a tuple with the ReadOnly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetReadOnlyOk() (ret FieldgetReadOnlyRetType, ok bool) {
return getFieldgetReadOnlyAttributeTypeOk(o.ReadOnly)
}
// HasReadOnly returns a boolean if a field has been set.
func (o *Field) HasReadOnly() bool {
_, ok := o.GetReadOnlyOk()
return ok
}
// SetReadOnly gets a reference to the given bool and assigns it to the ReadOnly field.
func (o *Field) SetReadOnly(v FieldgetReadOnlyRetType) {
setFieldgetReadOnlyAttributeType(&o.ReadOnly, v)
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *Field) GetTitle() (res FieldGetTitleRetType) {
res, _ = o.GetTitleOk()
return
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetTitleOk() (ret FieldGetTitleRetType, ok bool) {
return getFieldGetTitleAttributeTypeOk(o.Title)
}
// HasTitle returns a boolean if a field has been set.
func (o *Field) HasTitle() bool {
_, ok := o.GetTitleOk()
return ok
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *Field) SetTitle(v FieldGetTitleRetType) {
setFieldGetTitleAttributeType(&o.Title, v)
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *Field) GetType() (res FieldGetTypeRetType) {
res, _ = o.GetTypeOk()
return
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Field) GetTypeOk() (ret FieldGetTypeRetType, ok bool) {
return getFieldGetTypeAttributeTypeOk(o.Type)
}
// HasType returns a boolean if a field has been set.
func (o *Field) HasType() bool {
_, ok := o.GetTypeOk()
return ok
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *Field) SetType(v FieldGetTypeRetType) {
setFieldGetTypeAttributeType(&o.Type, v)
}
func (o Field) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getFieldGetDefaultAttributeTypeOk(o.Default); ok {
toSerialize["Default"] = val
}
if val, ok := getFieldGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getFieldGetMaxLenAttributeTypeOk(o.MaxLen); ok {
toSerialize["MaxLen"] = val
}
if val, ok := getFieldGetMinLenAttributeTypeOk(o.MinLen); ok {
toSerialize["MinLen"] = val
}
if val, ok := getFieldgetReadOnlyAttributeTypeOk(o.ReadOnly); ok {
toSerialize["ReadOnly"] = val
}
if val, ok := getFieldGetTitleAttributeTypeOk(o.Title); ok {
toSerialize["Title"] = val
}
if val, ok := getFieldGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableField struct {
value *Field
isSet bool
}
func (v NullableField) Get() *Field {
return v.value
}
func (v *NullableField) Set(val *Field) {
v.value = val
v.isSet = true
}
func (v NullableField) IsSet() bool {
return v.isSet
}
func (v *NullableField) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableField(val *Field) *NullableField {
return &NullableField{value: val, isSet: true}
}
func (v NullableField) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableField) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}