feat: generating code
This commit is contained in:
parent
c329d58970
commit
51663cd8d0
1221 changed files with 271709 additions and 2444 deletions
174
pkg/cdnbeta/model_waf_config_patch.go
Normal file
174
pkg/cdnbeta/model_waf_config_patch.go
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
/*
|
||||
CDN API
|
||||
|
||||
API used to create and manage your CDN distributions.
|
||||
|
||||
API version: 1beta2.0.0
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
||||
|
||||
package cdnbeta
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
)
|
||||
|
||||
// checks if the WafConfigPatch type satisfies the MappedNullable interface at compile time
|
||||
var _ MappedNullable = &WafConfigPatch{}
|
||||
|
||||
/*
|
||||
types and functions for mode
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type WafConfigPatchGetModeAttributeType = *WafMode
|
||||
type WafConfigPatchGetModeArgType = WafMode
|
||||
type WafConfigPatchGetModeRetType = WafMode
|
||||
|
||||
func getWafConfigPatchGetModeAttributeTypeOk(arg WafConfigPatchGetModeAttributeType) (ret WafConfigPatchGetModeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setWafConfigPatchGetModeAttributeType(arg *WafConfigPatchGetModeAttributeType, val WafConfigPatchGetModeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
/*
|
||||
types and functions for type
|
||||
*/
|
||||
|
||||
// isEnumRef
|
||||
type WafConfigPatchGetTypeAttributeType = *WafType
|
||||
type WafConfigPatchGetTypeArgType = WafType
|
||||
type WafConfigPatchGetTypeRetType = WafType
|
||||
|
||||
func getWafConfigPatchGetTypeAttributeTypeOk(arg WafConfigPatchGetTypeAttributeType) (ret WafConfigPatchGetTypeRetType, ok bool) {
|
||||
if arg == nil {
|
||||
return ret, false
|
||||
}
|
||||
return *arg, true
|
||||
}
|
||||
|
||||
func setWafConfigPatchGetTypeAttributeType(arg *WafConfigPatchGetTypeAttributeType, val WafConfigPatchGetTypeRetType) {
|
||||
*arg = &val
|
||||
}
|
||||
|
||||
// WafConfigPatch struct for WafConfigPatch
|
||||
type WafConfigPatch struct {
|
||||
Mode WafConfigPatchGetModeAttributeType `json:"mode,omitempty"`
|
||||
Type WafConfigPatchGetTypeAttributeType `json:"type,omitempty"`
|
||||
}
|
||||
|
||||
// NewWafConfigPatch instantiates a new WafConfigPatch 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 NewWafConfigPatch() *WafConfigPatch {
|
||||
this := WafConfigPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewWafConfigPatchWithDefaults instantiates a new WafConfigPatch 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 NewWafConfigPatchWithDefaults() *WafConfigPatch {
|
||||
this := WafConfigPatch{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetMode returns the Mode field value if set, zero value otherwise.
|
||||
func (o *WafConfigPatch) GetMode() (res WafConfigPatchGetModeRetType) {
|
||||
res, _ = o.GetModeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetModeOk returns a tuple with the Mode field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *WafConfigPatch) GetModeOk() (ret WafConfigPatchGetModeRetType, ok bool) {
|
||||
return getWafConfigPatchGetModeAttributeTypeOk(o.Mode)
|
||||
}
|
||||
|
||||
// HasMode returns a boolean if a field has been set.
|
||||
func (o *WafConfigPatch) HasMode() bool {
|
||||
_, ok := o.GetModeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetMode gets a reference to the given WafMode and assigns it to the Mode field.
|
||||
func (o *WafConfigPatch) SetMode(v WafConfigPatchGetModeRetType) {
|
||||
setWafConfigPatchGetModeAttributeType(&o.Mode, v)
|
||||
}
|
||||
|
||||
// GetType returns the Type field value if set, zero value otherwise.
|
||||
func (o *WafConfigPatch) GetType() (res WafConfigPatchGetTypeRetType) {
|
||||
res, _ = o.GetTypeOk()
|
||||
return
|
||||
}
|
||||
|
||||
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *WafConfigPatch) GetTypeOk() (ret WafConfigPatchGetTypeRetType, ok bool) {
|
||||
return getWafConfigPatchGetTypeAttributeTypeOk(o.Type)
|
||||
}
|
||||
|
||||
// HasType returns a boolean if a field has been set.
|
||||
func (o *WafConfigPatch) HasType() bool {
|
||||
_, ok := o.GetTypeOk()
|
||||
return ok
|
||||
}
|
||||
|
||||
// SetType gets a reference to the given WafType and assigns it to the Type field.
|
||||
func (o *WafConfigPatch) SetType(v WafConfigPatchGetTypeRetType) {
|
||||
setWafConfigPatchGetTypeAttributeType(&o.Type, v)
|
||||
}
|
||||
|
||||
func (o WafConfigPatch) ToMap() (map[string]interface{}, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if val, ok := getWafConfigPatchGetModeAttributeTypeOk(o.Mode); ok {
|
||||
toSerialize["Mode"] = val
|
||||
}
|
||||
if val, ok := getWafConfigPatchGetTypeAttributeTypeOk(o.Type); ok {
|
||||
toSerialize["Type"] = val
|
||||
}
|
||||
return toSerialize, nil
|
||||
}
|
||||
|
||||
type NullableWafConfigPatch struct {
|
||||
value *WafConfigPatch
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableWafConfigPatch) Get() *WafConfigPatch {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableWafConfigPatch) Set(val *WafConfigPatch) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableWafConfigPatch) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableWafConfigPatch) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableWafConfigPatch(val *WafConfigPatch) *NullableWafConfigPatch {
|
||||
return &NullableWafConfigPatch{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableWafConfigPatch) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableWafConfigPatch) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue