feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
172
pkg/iaasbeta/model_public_network.go
Normal file
172
pkg/iaasbeta/model_public_network.go
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
/*
|
||||
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 PublicNetwork type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &PublicNetwork{}
|
||||
|
||||
/*
|
||||
types and functions for cidr
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type PublicNetworkGetCidrAttributeType = *string
|
||||
|
||||
func getPublicNetworkGetCidrAttributeTypeOk(arg PublicNetworkGetCidrAttributeType) (ret PublicNetworkGetCidrRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPublicNetworkGetCidrAttributeType(arg *PublicNetworkGetCidrAttributeType, val PublicNetworkGetCidrRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type PublicNetworkGetCidrArgType = string
|
||||
type PublicNetworkGetCidrRetType = string
|
||||
|
||||
/*
|
||||
types and functions for region
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type PublicNetworkGetRegionAttributeType = *string
|
||||
|
||||
func getPublicNetworkGetRegionAttributeTypeOk(arg PublicNetworkGetRegionAttributeType) (ret PublicNetworkGetRegionRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setPublicNetworkGetRegionAttributeType(arg *PublicNetworkGetRegionAttributeType, val PublicNetworkGetRegionRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type PublicNetworkGetRegionArgType = string
|
||||
type PublicNetworkGetRegionRetType = string
|
||||
|
||||
// PublicNetwork Public network.
|
||||
type PublicNetwork struct {
|
||||
// Classless Inter-Domain Routing (CIDR).
|
||||
// REQUIRED
|
||||
Cidr PublicNetworkGetCidrAttributeType `json:"cidr" required:"true"`
|
||||
// Name of the region.
|
||||
// REQUIRED
|
||||
Region PublicNetworkGetRegionAttributeType `json:"region" required:"true"`
|
||||
}
|
||||
|
||||
type _PublicNetwork PublicNetwork
|
||||
|
||||
// NewPublicNetwork instantiates a new PublicNetwork 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 NewPublicNetwork(cidr PublicNetworkGetCidrArgType, region PublicNetworkGetRegionArgType) *PublicNetwork {
|
||||
this := PublicNetwork{}
|
||||
setPublicNetworkGetCidrAttributeType(&this.Cidr, cidr)
|
||||
setPublicNetworkGetRegionAttributeType(&this.Region, region)
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewPublicNetworkWithDefaults instantiates a new PublicNetwork 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 NewPublicNetworkWithDefaults() *PublicNetwork {
|
||||
this := PublicNetwork{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetCidr returns the Cidr field value
|
||||
func (o *PublicNetwork) GetCidr() (ret PublicNetworkGetCidrRetType) {
|
||||
ret, _ = o.GetCidrOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetCidrOk returns a tuple with the Cidr field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PublicNetwork) GetCidrOk() (ret PublicNetworkGetCidrRetType, ok bool) {
|
||||
return getPublicNetworkGetCidrAttributeTypeOk(o.Cidr)
|
||||
}
|
||||
|
||||
// SetCidr sets field value
|
||||
func (o *PublicNetwork) SetCidr(v PublicNetworkGetCidrRetType) {
|
||||
setPublicNetworkGetCidrAttributeType(&o.Cidr, v)
|
||||
}
|
||||
|
||||
// GetRegion returns the Region field value
|
||||
func (o *PublicNetwork) GetRegion() (ret PublicNetworkGetRegionRetType) {
|
||||
ret, _ = o.GetRegionOk()
|
||||
return ret
|
||||
}
|
||||
|
||||
// GetRegionOk returns a tuple with the Region field value
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *PublicNetwork) GetRegionOk() (ret PublicNetworkGetRegionRetType, ok bool) {
|
||||
return getPublicNetworkGetRegionAttributeTypeOk(o.Region)
|
||||
}
|
||||
|
||||
// SetRegion sets field value
|
||||
func (o *PublicNetwork) SetRegion(v PublicNetworkGetRegionRetType) {
|
||||
setPublicNetworkGetRegionAttributeType(&o.Region, v)
|
||||
}
|
||||
|
||||
func (o PublicNetwork) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getPublicNetworkGetCidrAttributeTypeOk(o.Cidr); ok {
|
||||
toSerialize["Cidr"] = val
|
||||
}
|
||||
if val, ok := getPublicNetworkGetRegionAttributeTypeOk(o.Region); ok {
|
||||
toSerialize["Region"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullablePublicNetwork struct {
|
||||
value *PublicNetwork
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullablePublicNetwork) Get() *PublicNetwork {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullablePublicNetwork) Set(val *PublicNetwork) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullablePublicNetwork) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullablePublicNetwork) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullablePublicNetwork(val *PublicNetwork) *NullablePublicNetwork {
|
||||
return &NullablePublicNetwork{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullablePublicNetwork) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullablePublicNetwork) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue