feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
272
pkg/iaasbeta/model_create_isolated_network_payload.go
Normal file
272
pkg/iaasbeta/model_create_isolated_network_payload.go
Normal file
|
|
@ -0,0 +1,272 @@
|
|||
/*
|
||||
STACKIT IaaS API
|
||||
|
||||
This API allows you to create and modify IaaS resources.
|
||||
|
||||
API version: 2beta1
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package iaasbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the CreateIsolatedNetworkPayload type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &CreateIsolatedNetworkPayload{}
|
||||
|
||||
/*
|
||||
types and functions for dhcp
|
||||
*/
|
||||
|
||||
// isBoolean
|
||||
type CreateIsolatedNetworkPayloadgetDhcpAttributeType = *bool
|
||||
type CreateIsolatedNetworkPayloadgetDhcpArgType = bool
|
||||
type CreateIsolatedNetworkPayloadgetDhcpRetType = bool
|
||||
|
||||
func getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(arg CreateIsolatedNetworkPayloadgetDhcpAttributeType) (ret CreateIsolatedNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadgetDhcpAttributeType(arg *CreateIsolatedNetworkPayloadgetDhcpAttributeType, val CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for ipv4
|
||||
*/
|
||||
|
||||
// isModel
|
||||
type CreateIsolatedNetworkPayloadGetIpv4AttributeType = *CreateNetworkIPv4
|
||||
type CreateIsolatedNetworkPayloadGetIpv4ArgType = CreateNetworkIPv4
|
||||
type CreateIsolatedNetworkPayloadGetIpv4RetType = CreateNetworkIPv4
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(arg CreateIsolatedNetworkPayloadGetIpv4AttributeType) (ret CreateIsolatedNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetIpv4AttributeType(arg *CreateIsolatedNetworkPayloadGetIpv4AttributeType, val CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for labels
|
||||
*/
|
||||
|
||||
// isFreeform
|
||||
type CreateIsolatedNetworkPayloadGetLabelsAttributeType = *map[string]interface{}
|
||||
type CreateIsolatedNetworkPayloadGetLabelsArgType = map[string]interface{}
|
||||
type CreateIsolatedNetworkPayloadGetLabelsRetType = map[string]interface{}
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetLabelsAttributeType) (ret CreateIsolatedNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetLabelsAttributeType(arg *CreateIsolatedNetworkPayloadGetLabelsAttributeType, val CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type CreateIsolatedNetworkPayloadGetNameAttributeType = *string
|
||||
|
||||
func getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(arg CreateIsolatedNetworkPayloadGetNameAttributeType) (ret CreateIsolatedNetworkPayloadGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setCreateIsolatedNetworkPayloadGetNameAttributeType(arg *CreateIsolatedNetworkPayloadGetNameAttributeType, val CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type CreateIsolatedNetworkPayloadGetNameArgType = string
|
||||
type CreateIsolatedNetworkPayloadGetNameRetType = string
|
||||
|
||||
// CreateIsolatedNetworkPayload Object that represents the request body for a single isolated network create.
|
||||
type CreateIsolatedNetworkPayload struct {
|
||||
// Enable or disable DHCP for a network.
|
||||
Dhcp CreateIsolatedNetworkPayloadgetDhcpAttributeType `json:"dhcp,omitempty"`
|
||||
Ipv4 CreateIsolatedNetworkPayloadGetIpv4AttributeType `json:"ipv4,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 CreateIsolatedNetworkPayloadGetLabelsAttributeType `json:"labels,omitempty"`
|
||||
// The name for a General Object. Matches Names and also UUIDs.
|
||||
// REQUIRED
|
||||
Name CreateIsolatedNetworkPayloadGetNameAttributeType `json:"name" required:"true"`
|
||||
}
|
||||
|
||||
type _CreateIsolatedNetworkPayload CreateIsolatedNetworkPayload
|
||||
|
||||
// NewCreateIsolatedNetworkPayload instantiates a new CreateIsolatedNetworkPayload 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 NewCreateIsolatedNetworkPayload(name CreateIsolatedNetworkPayloadGetNameArgType) *CreateIsolatedNetworkPayload {
|
||||
this := CreateIsolatedNetworkPayload{}
|
||||
setCreateIsolatedNetworkPayloadGetNameAttributeType(&this.Name, name)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewCreateIsolatedNetworkPayloadWithDefaults instantiates a new CreateIsolatedNetworkPayload 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 NewCreateIsolatedNetworkPayloadWithDefaults() *CreateIsolatedNetworkPayload {
|
||||
this := CreateIsolatedNetworkPayload{}
|
||||
var dhcp bool = true
|
||||
this.Dhcp = &dhcp
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetDhcp returns the Dhcp field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetDhcp() (res CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
res, _ = o.GetDhcpOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetDhcpOk returns a tuple with the Dhcp field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) GetDhcpOk() (ret CreateIsolatedNetworkPayloadgetDhcpRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp)
|
||||
}
|
||||
|
||||
// HasDhcp returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) HasDhcp() bool {
|
||||
_, ok := o.GetDhcpOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetDhcp gets a reference to the given bool and assigns it to the Dhcp field.
|
||||
func (o *CreateIsolatedNetworkPayload) SetDhcp(v CreateIsolatedNetworkPayloadgetDhcpRetType) {
|
||||
setCreateIsolatedNetworkPayloadgetDhcpAttributeType(&o.Dhcp, v)
|
||||
}
|
||||
|
||||
// GetIpv4 returns the Ipv4 field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetIpv4() (res CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
res, _ = o.GetIpv4Ok()
|
||||
return
|
||||
}
|
||||
|
||||
// GetIpv4Ok returns a tuple with the Ipv4 field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) GetIpv4Ok() (ret CreateIsolatedNetworkPayloadGetIpv4RetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4)
|
||||
}
|
||||
|
||||
// HasIpv4 returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) HasIpv4() bool {
|
||||
_, ok := o.GetIpv4Ok()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetIpv4 gets a reference to the given CreateNetworkIPv4 and assigns it to the Ipv4 field.
|
||||
func (o *CreateIsolatedNetworkPayload) SetIpv4(v CreateIsolatedNetworkPayloadGetIpv4RetType) {
|
||||
setCreateIsolatedNetworkPayloadGetIpv4AttributeType(&o.Ipv4, v)
|
||||
}
|
||||
|
||||
// GetLabels returns the Labels field value if set, zero value otherwise.
|
||||
func (o *CreateIsolatedNetworkPayload) GetLabels() (res CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
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 *CreateIsolatedNetworkPayload) GetLabelsOk() (ret CreateIsolatedNetworkPayloadGetLabelsRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels)
|
||||
}
|
||||
|
||||
// HasLabels returns a boolean if a field has been set.
|
||||
func (o *CreateIsolatedNetworkPayload) 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 *CreateIsolatedNetworkPayload) SetLabels(v CreateIsolatedNetworkPayloadGetLabelsRetType) {
|
||||
setCreateIsolatedNetworkPayloadGetLabelsAttributeType(&o.Labels, v)
|
||||
}
|
||||
|
||||
// GetName returns the Name field value
|
||||
func (o *CreateIsolatedNetworkPayload) GetName() (ret CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
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 *CreateIsolatedNetworkPayload) GetNameOk() (ret CreateIsolatedNetworkPayloadGetNameRetType, ok bool) {
|
||||
return getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// SetName sets field value
|
||||
func (o *CreateIsolatedNetworkPayload) SetName(v CreateIsolatedNetworkPayloadGetNameRetType) {
|
||||
setCreateIsolatedNetworkPayloadGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
func (o CreateIsolatedNetworkPayload) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadgetDhcpAttributeTypeOk(o.Dhcp); ok {
|
||||
toSerialize["Dhcp"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetIpv4AttributeTypeOk(o.Ipv4); ok {
|
||||
toSerialize["Ipv4"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetLabelsAttributeTypeOk(o.Labels); ok {
|
||||
toSerialize["Labels"] = val
|
||||
}
|
||||
if val, ok := getCreateIsolatedNetworkPayloadGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableCreateIsolatedNetworkPayload struct {
|
||||
value *CreateIsolatedNetworkPayload
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) Get() *CreateIsolatedNetworkPayload {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) Set(val *CreateIsolatedNetworkPayload) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableCreateIsolatedNetworkPayload(val *CreateIsolatedNetworkPayload) *NullableCreateIsolatedNetworkPayload {
|
||||
return &NullableCreateIsolatedNetworkPayload{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableCreateIsolatedNetworkPayload) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableCreateIsolatedNetworkPayload) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue