terraform-provider-stackitp.../pkg/iaasalpha/model_routing_table.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

518 lines
17 KiB
Go

/*
STACKIT IaaS API
This API allows you to create and modify IaaS resources.
API version: 2alpha1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package iaasalpha
import (
"encoding/json"
"time"
)
// checks if the RoutingTable type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RoutingTable{}
/*
types and functions for createdAt
*/
// isDateTime
type RoutingTableGetCreatedAtAttributeType = *time.Time
type RoutingTableGetCreatedAtArgType = time.Time
type RoutingTableGetCreatedAtRetType = time.Time
func getRoutingTableGetCreatedAtAttributeTypeOk(arg RoutingTableGetCreatedAtAttributeType) (ret RoutingTableGetCreatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetCreatedAtAttributeType(arg *RoutingTableGetCreatedAtAttributeType, val RoutingTableGetCreatedAtRetType) {
*arg = &val
}
/*
types and functions for default
*/
// isBoolean
type RoutingTablegetDefaultAttributeType = *bool
type RoutingTablegetDefaultArgType = bool
type RoutingTablegetDefaultRetType = bool
func getRoutingTablegetDefaultAttributeTypeOk(arg RoutingTablegetDefaultAttributeType) (ret RoutingTablegetDefaultRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTablegetDefaultAttributeType(arg *RoutingTablegetDefaultAttributeType, val RoutingTablegetDefaultRetType) {
*arg = &val
}
/*
types and functions for description
*/
// isNotNullableString
type RoutingTableGetDescriptionAttributeType = *string
func getRoutingTableGetDescriptionAttributeTypeOk(arg RoutingTableGetDescriptionAttributeType) (ret RoutingTableGetDescriptionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetDescriptionAttributeType(arg *RoutingTableGetDescriptionAttributeType, val RoutingTableGetDescriptionRetType) {
*arg = &val
}
type RoutingTableGetDescriptionArgType = string
type RoutingTableGetDescriptionRetType = string
/*
types and functions for dynamicRoutes
*/
// isBoolean
type RoutingTablegetDynamicRoutesAttributeType = *bool
type RoutingTablegetDynamicRoutesArgType = bool
type RoutingTablegetDynamicRoutesRetType = bool
func getRoutingTablegetDynamicRoutesAttributeTypeOk(arg RoutingTablegetDynamicRoutesAttributeType) (ret RoutingTablegetDynamicRoutesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTablegetDynamicRoutesAttributeType(arg *RoutingTablegetDynamicRoutesAttributeType, val RoutingTablegetDynamicRoutesRetType) {
*arg = &val
}
/*
types and functions for id
*/
// isNotNullableString
type RoutingTableGetIdAttributeType = *string
func getRoutingTableGetIdAttributeTypeOk(arg RoutingTableGetIdAttributeType) (ret RoutingTableGetIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetIdAttributeType(arg *RoutingTableGetIdAttributeType, val RoutingTableGetIdRetType) {
*arg = &val
}
type RoutingTableGetIdArgType = string
type RoutingTableGetIdRetType = string
/*
types and functions for labels
*/
// isFreeform
type RoutingTableGetLabelsAttributeType = *map[string]interface{}
type RoutingTableGetLabelsArgType = map[string]interface{}
type RoutingTableGetLabelsRetType = map[string]interface{}
func getRoutingTableGetLabelsAttributeTypeOk(arg RoutingTableGetLabelsAttributeType) (ret RoutingTableGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetLabelsAttributeType(arg *RoutingTableGetLabelsAttributeType, val RoutingTableGetLabelsRetType) {
*arg = &val
}
/*
types and functions for name
*/
// isNotNullableString
type RoutingTableGetNameAttributeType = *string
func getRoutingTableGetNameAttributeTypeOk(arg RoutingTableGetNameAttributeType) (ret RoutingTableGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetNameAttributeType(arg *RoutingTableGetNameAttributeType, val RoutingTableGetNameRetType) {
*arg = &val
}
type RoutingTableGetNameArgType = string
type RoutingTableGetNameRetType = string
/*
types and functions for systemRoutes
*/
// isBoolean
type RoutingTablegetSystemRoutesAttributeType = *bool
type RoutingTablegetSystemRoutesArgType = bool
type RoutingTablegetSystemRoutesRetType = bool
func getRoutingTablegetSystemRoutesAttributeTypeOk(arg RoutingTablegetSystemRoutesAttributeType) (ret RoutingTablegetSystemRoutesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTablegetSystemRoutesAttributeType(arg *RoutingTablegetSystemRoutesAttributeType, val RoutingTablegetSystemRoutesRetType) {
*arg = &val
}
/*
types and functions for updatedAt
*/
// isDateTime
type RoutingTableGetUpdatedAtAttributeType = *time.Time
type RoutingTableGetUpdatedAtArgType = time.Time
type RoutingTableGetUpdatedAtRetType = time.Time
func getRoutingTableGetUpdatedAtAttributeTypeOk(arg RoutingTableGetUpdatedAtAttributeType) (ret RoutingTableGetUpdatedAtRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setRoutingTableGetUpdatedAtAttributeType(arg *RoutingTableGetUpdatedAtAttributeType, val RoutingTableGetUpdatedAtRetType) {
*arg = &val
}
// RoutingTable An object representing a routing table.
type RoutingTable struct {
// Date-time when resource was created.
CreatedAt RoutingTableGetCreatedAtAttributeType `json:"createdAt,omitempty"`
// This is the default routing table. It can't be deleted and is used if the user does not specify it otherwise.
Default RoutingTablegetDefaultAttributeType `json:"default,omitempty"`
// Description Object. Allows string up to 255 Characters.
Description RoutingTableGetDescriptionAttributeType `json:"description,omitempty"`
// A config setting for a routing table which allows propagation of dynamic routes to this routing table.
DynamicRoutes RoutingTablegetDynamicRoutesAttributeType `json:"dynamicRoutes,omitempty"`
// Universally Unique Identifier (UUID).
Id RoutingTableGetIdAttributeType `json:"id,omitempty"`
// Object that represents the labels of an object. Regex for keys: `^(?=.{1,63}$)([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9]$`. Regex for values: `^(?=.{0,63}$)(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])*$`. Providing a `null` value for a key will remove that key.
Labels RoutingTableGetLabelsAttributeType `json:"labels,omitempty"`
// The name for a General Object. Matches Names and also UUIDs.
// REQUIRED
Name RoutingTableGetNameAttributeType `json:"name" required:"true"`
// A config setting for a routing table which allows installation of automatic system routes for connectivity between projects in the same SNA.
SystemRoutes RoutingTablegetSystemRoutesAttributeType `json:"systemRoutes,omitempty"`
// Date-time when resource was last updated.
UpdatedAt RoutingTableGetUpdatedAtAttributeType `json:"updatedAt,omitempty"`
}
type _RoutingTable RoutingTable
// NewRoutingTable instantiates a new RoutingTable 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 NewRoutingTable(name RoutingTableGetNameArgType) *RoutingTable {
this := RoutingTable{}
setRoutingTableGetNameAttributeType(&this.Name, name)
return &this
}
// NewRoutingTableWithDefaults instantiates a new RoutingTable 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 NewRoutingTableWithDefaults() *RoutingTable {
this := RoutingTable{}
var dynamicRoutes bool = true
this.DynamicRoutes = &dynamicRoutes
var systemRoutes bool = true
this.SystemRoutes = &systemRoutes
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *RoutingTable) GetCreatedAt() (res RoutingTableGetCreatedAtRetType) {
res, _ = o.GetCreatedAtOk()
return
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetCreatedAtOk() (ret RoutingTableGetCreatedAtRetType, ok bool) {
return getRoutingTableGetCreatedAtAttributeTypeOk(o.CreatedAt)
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *RoutingTable) HasCreatedAt() bool {
_, ok := o.GetCreatedAtOk()
return ok
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *RoutingTable) SetCreatedAt(v RoutingTableGetCreatedAtRetType) {
setRoutingTableGetCreatedAtAttributeType(&o.CreatedAt, v)
}
// GetDefault returns the Default field value if set, zero value otherwise.
func (o *RoutingTable) GetDefault() (res RoutingTablegetDefaultRetType) {
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 *RoutingTable) GetDefaultOk() (ret RoutingTablegetDefaultRetType, ok bool) {
return getRoutingTablegetDefaultAttributeTypeOk(o.Default)
}
// HasDefault returns a boolean if a field has been set.
func (o *RoutingTable) HasDefault() bool {
_, ok := o.GetDefaultOk()
return ok
}
// SetDefault gets a reference to the given bool and assigns it to the Default field.
func (o *RoutingTable) SetDefault(v RoutingTablegetDefaultRetType) {
setRoutingTablegetDefaultAttributeType(&o.Default, v)
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *RoutingTable) GetDescription() (res RoutingTableGetDescriptionRetType) {
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 *RoutingTable) GetDescriptionOk() (ret RoutingTableGetDescriptionRetType, ok bool) {
return getRoutingTableGetDescriptionAttributeTypeOk(o.Description)
}
// HasDescription returns a boolean if a field has been set.
func (o *RoutingTable) HasDescription() bool {
_, ok := o.GetDescriptionOk()
return ok
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *RoutingTable) SetDescription(v RoutingTableGetDescriptionRetType) {
setRoutingTableGetDescriptionAttributeType(&o.Description, v)
}
// GetDynamicRoutes returns the DynamicRoutes field value if set, zero value otherwise.
func (o *RoutingTable) GetDynamicRoutes() (res RoutingTablegetDynamicRoutesRetType) {
res, _ = o.GetDynamicRoutesOk()
return
}
// GetDynamicRoutesOk returns a tuple with the DynamicRoutes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetDynamicRoutesOk() (ret RoutingTablegetDynamicRoutesRetType, ok bool) {
return getRoutingTablegetDynamicRoutesAttributeTypeOk(o.DynamicRoutes)
}
// HasDynamicRoutes returns a boolean if a field has been set.
func (o *RoutingTable) HasDynamicRoutes() bool {
_, ok := o.GetDynamicRoutesOk()
return ok
}
// SetDynamicRoutes gets a reference to the given bool and assigns it to the DynamicRoutes field.
func (o *RoutingTable) SetDynamicRoutes(v RoutingTablegetDynamicRoutesRetType) {
setRoutingTablegetDynamicRoutesAttributeType(&o.DynamicRoutes, v)
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *RoutingTable) GetId() (res RoutingTableGetIdRetType) {
res, _ = o.GetIdOk()
return
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetIdOk() (ret RoutingTableGetIdRetType, ok bool) {
return getRoutingTableGetIdAttributeTypeOk(o.Id)
}
// HasId returns a boolean if a field has been set.
func (o *RoutingTable) HasId() bool {
_, ok := o.GetIdOk()
return ok
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *RoutingTable) SetId(v RoutingTableGetIdRetType) {
setRoutingTableGetIdAttributeType(&o.Id, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *RoutingTable) GetLabels() (res RoutingTableGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetLabelsOk() (ret RoutingTableGetLabelsRetType, ok bool) {
return getRoutingTableGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *RoutingTable) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]interface{} and assigns it to the Labels field.
func (o *RoutingTable) SetLabels(v RoutingTableGetLabelsRetType) {
setRoutingTableGetLabelsAttributeType(&o.Labels, v)
}
// GetName returns the Name field value
func (o *RoutingTable) GetName() (ret RoutingTableGetNameRetType) {
ret, _ = o.GetNameOk()
return ret
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetNameOk() (ret RoutingTableGetNameRetType, ok bool) {
return getRoutingTableGetNameAttributeTypeOk(o.Name)
}
// SetName sets field value
func (o *RoutingTable) SetName(v RoutingTableGetNameRetType) {
setRoutingTableGetNameAttributeType(&o.Name, v)
}
// GetSystemRoutes returns the SystemRoutes field value if set, zero value otherwise.
func (o *RoutingTable) GetSystemRoutes() (res RoutingTablegetSystemRoutesRetType) {
res, _ = o.GetSystemRoutesOk()
return
}
// GetSystemRoutesOk returns a tuple with the SystemRoutes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetSystemRoutesOk() (ret RoutingTablegetSystemRoutesRetType, ok bool) {
return getRoutingTablegetSystemRoutesAttributeTypeOk(o.SystemRoutes)
}
// HasSystemRoutes returns a boolean if a field has been set.
func (o *RoutingTable) HasSystemRoutes() bool {
_, ok := o.GetSystemRoutesOk()
return ok
}
// SetSystemRoutes gets a reference to the given bool and assigns it to the SystemRoutes field.
func (o *RoutingTable) SetSystemRoutes(v RoutingTablegetSystemRoutesRetType) {
setRoutingTablegetSystemRoutesAttributeType(&o.SystemRoutes, v)
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *RoutingTable) GetUpdatedAt() (res RoutingTableGetUpdatedAtRetType) {
res, _ = o.GetUpdatedAtOk()
return
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RoutingTable) GetUpdatedAtOk() (ret RoutingTableGetUpdatedAtRetType, ok bool) {
return getRoutingTableGetUpdatedAtAttributeTypeOk(o.UpdatedAt)
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *RoutingTable) HasUpdatedAt() bool {
_, ok := o.GetUpdatedAtOk()
return ok
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *RoutingTable) SetUpdatedAt(v RoutingTableGetUpdatedAtRetType) {
setRoutingTableGetUpdatedAtAttributeType(&o.UpdatedAt, v)
}
func (o RoutingTable) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getRoutingTableGetCreatedAtAttributeTypeOk(o.CreatedAt); ok {
toSerialize["CreatedAt"] = val
}
if val, ok := getRoutingTablegetDefaultAttributeTypeOk(o.Default); ok {
toSerialize["Default"] = val
}
if val, ok := getRoutingTableGetDescriptionAttributeTypeOk(o.Description); ok {
toSerialize["Description"] = val
}
if val, ok := getRoutingTablegetDynamicRoutesAttributeTypeOk(o.DynamicRoutes); ok {
toSerialize["DynamicRoutes"] = val
}
if val, ok := getRoutingTableGetIdAttributeTypeOk(o.Id); ok {
toSerialize["Id"] = val
}
if val, ok := getRoutingTableGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getRoutingTableGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getRoutingTablegetSystemRoutesAttributeTypeOk(o.SystemRoutes); ok {
toSerialize["SystemRoutes"] = val
}
if val, ok := getRoutingTableGetUpdatedAtAttributeTypeOk(o.UpdatedAt); ok {
toSerialize["UpdatedAt"] = val
}
return toSerialize, nil
}
type NullableRoutingTable struct {
value *RoutingTable
isSet bool
}
func (v NullableRoutingTable) Get() *RoutingTable {
return v.value
}
func (v *NullableRoutingTable) Set(val *RoutingTable) {
v.value = val
v.isSet = true
}
func (v NullableRoutingTable) IsSet() bool {
return v.isSet
}
func (v *NullableRoutingTable) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRoutingTable(val *RoutingTable) *NullableRoutingTable {
return &NullableRoutingTable{value: val, isSet: true}
}
func (v NullableRoutingTable) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRoutingTable) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}