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

237 lines
7.1 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"
)
// checks if the NetworkIPv6 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &NetworkIPv6{}
/*
types and functions for gateway
*/
// isNullableString
type NetworkIPv6GetGatewayAttributeType = *NullableString
func getNetworkIPv6GetGatewayAttributeTypeOk(arg NetworkIPv6GetGatewayAttributeType) (ret NetworkIPv6GetGatewayRetType, ok bool) {
if arg == nil {
return nil, false
}
return arg.Get(), true
}
func setNetworkIPv6GetGatewayAttributeType(arg *NetworkIPv6GetGatewayAttributeType, val NetworkIPv6GetGatewayRetType) {
if IsNil(*arg) {
*arg = NewNullableString(val)
} else {
(*arg).Set(val)
}
}
type NetworkIPv6GetGatewayArgType = *string
type NetworkIPv6GetGatewayRetType = *string
/*
types and functions for nameservers
*/
// isArray
type NetworkIPv6GetNameserversAttributeType = *[]string
type NetworkIPv6GetNameserversArgType = []string
type NetworkIPv6GetNameserversRetType = []string
func getNetworkIPv6GetNameserversAttributeTypeOk(arg NetworkIPv6GetNameserversAttributeType) (ret NetworkIPv6GetNameserversRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNetworkIPv6GetNameserversAttributeType(arg *NetworkIPv6GetNameserversAttributeType, val NetworkIPv6GetNameserversRetType) {
*arg = &val
}
/*
types and functions for prefixes
*/
// isArray
type NetworkIPv6GetPrefixesAttributeType = *[]string
type NetworkIPv6GetPrefixesArgType = []string
type NetworkIPv6GetPrefixesRetType = []string
func getNetworkIPv6GetPrefixesAttributeTypeOk(arg NetworkIPv6GetPrefixesAttributeType) (ret NetworkIPv6GetPrefixesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setNetworkIPv6GetPrefixesAttributeType(arg *NetworkIPv6GetPrefixesAttributeType, val NetworkIPv6GetPrefixesRetType) {
*arg = &val
}
// NetworkIPv6 Object that represents the IPv6 part of a network.
type NetworkIPv6 struct {
// The IPv6 gateway of a network. If not specified the first IP of the network will be assigned as the gateway. If 'null' is sent, then the network doesn't have a gateway.
Gateway NetworkIPv6GetGatewayAttributeType `json:"gateway,omitempty"`
// A list containing DNS Servers/Nameservers for IPv6.
Nameservers NetworkIPv6GetNameserversAttributeType `json:"nameservers,omitempty"`
// REQUIRED
Prefixes NetworkIPv6GetPrefixesAttributeType `json:"prefixes" required:"true"`
}
type _NetworkIPv6 NetworkIPv6
// NewNetworkIPv6 instantiates a new NetworkIPv6 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 NewNetworkIPv6(prefixes NetworkIPv6GetPrefixesArgType) *NetworkIPv6 {
this := NetworkIPv6{}
setNetworkIPv6GetPrefixesAttributeType(&this.Prefixes, prefixes)
return &this
}
// NewNetworkIPv6WithDefaults instantiates a new NetworkIPv6 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 NewNetworkIPv6WithDefaults() *NetworkIPv6 {
this := NetworkIPv6{}
return &this
}
// GetGateway returns the Gateway field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *NetworkIPv6) GetGateway() (res NetworkIPv6GetGatewayRetType) {
res, _ = o.GetGatewayOk()
return
}
// GetGatewayOk returns a tuple with the Gateway field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *NetworkIPv6) GetGatewayOk() (ret NetworkIPv6GetGatewayRetType, ok bool) {
return getNetworkIPv6GetGatewayAttributeTypeOk(o.Gateway)
}
// HasGateway returns a boolean if a field has been set.
func (o *NetworkIPv6) HasGateway() bool {
_, ok := o.GetGatewayOk()
return ok
}
// SetGateway gets a reference to the given string and assigns it to the Gateway field.
func (o *NetworkIPv6) SetGateway(v NetworkIPv6GetGatewayRetType) {
setNetworkIPv6GetGatewayAttributeType(&o.Gateway, v)
}
// SetGatewayNil sets the value for Gateway to be an explicit nil
func (o *NetworkIPv6) SetGatewayNil() {
o.Gateway = nil
}
// UnsetGateway ensures that no value is present for Gateway, not even an explicit nil
func (o *NetworkIPv6) UnsetGateway() {
o.Gateway = nil
}
// GetNameservers returns the Nameservers field value if set, zero value otherwise.
func (o *NetworkIPv6) GetNameservers() (res NetworkIPv6GetNameserversRetType) {
res, _ = o.GetNameserversOk()
return
}
// GetNameserversOk returns a tuple with the Nameservers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *NetworkIPv6) GetNameserversOk() (ret NetworkIPv6GetNameserversRetType, ok bool) {
return getNetworkIPv6GetNameserversAttributeTypeOk(o.Nameservers)
}
// HasNameservers returns a boolean if a field has been set.
func (o *NetworkIPv6) HasNameservers() bool {
_, ok := o.GetNameserversOk()
return ok
}
// SetNameservers gets a reference to the given []string and assigns it to the Nameservers field.
func (o *NetworkIPv6) SetNameservers(v NetworkIPv6GetNameserversRetType) {
setNetworkIPv6GetNameserversAttributeType(&o.Nameservers, v)
}
// GetPrefixes returns the Prefixes field value
func (o *NetworkIPv6) GetPrefixes() (ret NetworkIPv6GetPrefixesRetType) {
ret, _ = o.GetPrefixesOk()
return ret
}
// GetPrefixesOk returns a tuple with the Prefixes field value
// and a boolean to check if the value has been set.
func (o *NetworkIPv6) GetPrefixesOk() (ret NetworkIPv6GetPrefixesRetType, ok bool) {
return getNetworkIPv6GetPrefixesAttributeTypeOk(o.Prefixes)
}
// SetPrefixes sets field value
func (o *NetworkIPv6) SetPrefixes(v NetworkIPv6GetPrefixesRetType) {
setNetworkIPv6GetPrefixesAttributeType(&o.Prefixes, v)
}
func (o NetworkIPv6) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getNetworkIPv6GetGatewayAttributeTypeOk(o.Gateway); ok {
toSerialize["Gateway"] = val
}
if val, ok := getNetworkIPv6GetNameserversAttributeTypeOk(o.Nameservers); ok {
toSerialize["Nameservers"] = val
}
if val, ok := getNetworkIPv6GetPrefixesAttributeTypeOk(o.Prefixes); ok {
toSerialize["Prefixes"] = val
}
return toSerialize, nil
}
type NullableNetworkIPv6 struct {
value *NetworkIPv6
isSet bool
}
func (v NullableNetworkIPv6) Get() *NetworkIPv6 {
return v.value
}
func (v *NullableNetworkIPv6) Set(val *NetworkIPv6) {
v.value = val
v.isSet = true
}
func (v NullableNetworkIPv6) IsSet() bool {
return v.isSet
}
func (v *NullableNetworkIPv6) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNetworkIPv6(val *NetworkIPv6) *NullableNetworkIPv6 {
return &NullableNetworkIPv6{value: val, isSet: true}
}
func (v NullableNetworkIPv6) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNetworkIPv6) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}