terraform-provider-stackitp.../pkg/cdnbeta/model_waf_config_patch.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

174 lines
4.8 KiB
Go

/*
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)
}