feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
177
pkg/iaasbeta/model_protocol.go
Normal file
177
pkg/iaasbeta/model_protocol.go
Normal file
|
|
@ -0,0 +1,177 @@
|
|||
/*
|
||||
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 Protocol type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &Protocol{}
|
||||
|
||||
/*
|
||||
types and functions for name
|
||||
*/
|
||||
|
||||
// isNotNullableString
|
||||
type ProtocolGetNameAttributeType = *string
|
||||
|
||||
func getProtocolGetNameAttributeTypeOk(arg ProtocolGetNameAttributeType) (ret ProtocolGetNameRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setProtocolGetNameAttributeType(arg *ProtocolGetNameAttributeType, val ProtocolGetNameRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
type ProtocolGetNameArgType = string
|
||||
type ProtocolGetNameRetType = string
|
||||
|
||||
/*
|
||||
types and functions for number
|
||||
*/
|
||||
|
||||
// isLong
|
||||
type ProtocolGetNumberAttributeType = *int64
|
||||
type ProtocolGetNumberArgType = int64
|
||||
type ProtocolGetNumberRetType = int64
|
||||
|
||||
func getProtocolGetNumberAttributeTypeOk(arg ProtocolGetNumberAttributeType) (ret ProtocolGetNumberRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setProtocolGetNumberAttributeType(arg *ProtocolGetNumberAttributeType, val ProtocolGetNumberRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// Protocol The schema for a protocol of a security group rule.
|
||||
type Protocol struct {
|
||||
// The protocol name which the rule should match. Possible values: `ah`, `dccp`, `egp`, `esp`, `gre`, `icmp`, `igmp`, `ipip`, `ipv6-encap`, `ipv6-frag`, `ipv6-icmp`, `ipv6-nonxt`, `ipv6-opts`, `ipv6-route`, `ospf`, `pgm`, `rsvp`, `sctp`, `tcp`, `udp`, `udplite`, `vrrp`.
|
||||
Name ProtocolGetNameAttributeType `json:"name,omitempty"`
|
||||
// The protocol number which the rule should match.
|
||||
Number ProtocolGetNumberAttributeType `json:"number,omitempty"`
|
||||
}
|
||||
|
||||
// NewProtocol instantiates a new Protocol 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 NewProtocol() *Protocol {
|
||||
this := Protocol{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewProtocolWithDefaults instantiates a new Protocol 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 NewProtocolWithDefaults() *Protocol {
|
||||
this := Protocol{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetName returns the Name field value if set, zero value otherwise.
|
||||
func (o *Protocol) GetName() (res ProtocolGetNameRetType) {
|
||||
res, _ = o.GetNameOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Protocol) GetNameOk() (ret ProtocolGetNameRetType, ok bool) {
|
||||
return getProtocolGetNameAttributeTypeOk(o.Name)
|
||||
}
|
||||
|
||||
// HasName returns a boolean if a field has been set.
|
||||
func (o *Protocol) HasName() bool {
|
||||
_, ok := o.GetNameOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetName gets a reference to the given string and assigns it to the Name field.
|
||||
func (o *Protocol) SetName(v ProtocolGetNameRetType) {
|
||||
setProtocolGetNameAttributeType(&o.Name, v)
|
||||
}
|
||||
|
||||
// GetNumber returns the Number field value if set, zero value otherwise.
|
||||
func (o *Protocol) GetNumber() (res ProtocolGetNumberRetType) {
|
||||
res, _ = o.GetNumberOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Protocol) GetNumberOk() (ret ProtocolGetNumberRetType, ok bool) {
|
||||
return getProtocolGetNumberAttributeTypeOk(o.Number)
|
||||
}
|
||||
|
||||
// HasNumber returns a boolean if a field has been set.
|
||||
func (o *Protocol) HasNumber() bool {
|
||||
_, ok := o.GetNumberOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetNumber gets a reference to the given int64 and assigns it to the Number field.
|
||||
func (o *Protocol) SetNumber(v ProtocolGetNumberRetType) {
|
||||
setProtocolGetNumberAttributeType(&o.Number, v)
|
||||
}
|
||||
|
||||
func (o Protocol) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getProtocolGetNameAttributeTypeOk(o.Name); ok {
|
||||
toSerialize["Name"] = val
|
||||
}
|
||||
if val, ok := getProtocolGetNumberAttributeTypeOk(o.Number); ok {
|
||||
toSerialize["Number"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableProtocol struct {
|
||||
value *Protocol
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableProtocol) Get() *Protocol {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableProtocol) Set(val *Protocol) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableProtocol) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableProtocol) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableProtocol(val *Protocol) *NullableProtocol {
|
||||
return &NullableProtocol{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableProtocol) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableProtocol) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue