## 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>
213 lines
6.2 KiB
Go
213 lines
6.2 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 WafRuleGroup type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &WafRuleGroup{}
|
|
|
|
/*
|
|
types and functions for description
|
|
*/
|
|
|
|
// isContainer
|
|
type WafRuleGroupGetDescriptionAttributeType = *map[string]string
|
|
type WafRuleGroupGetDescriptionArgType = map[string]string
|
|
type WafRuleGroupGetDescriptionRetType = map[string]string
|
|
|
|
func getWafRuleGroupGetDescriptionAttributeTypeOk(arg WafRuleGroupGetDescriptionAttributeType) (ret WafRuleGroupGetDescriptionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleGroupGetDescriptionAttributeType(arg *WafRuleGroupGetDescriptionAttributeType, val WafRuleGroupGetDescriptionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isContainer
|
|
type WafRuleGroupGetNameAttributeType = *map[string]string
|
|
type WafRuleGroupGetNameArgType = map[string]string
|
|
type WafRuleGroupGetNameRetType = map[string]string
|
|
|
|
func getWafRuleGroupGetNameAttributeTypeOk(arg WafRuleGroupGetNameAttributeType) (ret WafRuleGroupGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleGroupGetNameAttributeType(arg *WafRuleGroupGetNameAttributeType, val WafRuleGroupGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for rules
|
|
*/
|
|
|
|
// isArray
|
|
type WafRuleGroupGetRulesAttributeType = *[]WafRule
|
|
type WafRuleGroupGetRulesArgType = []WafRule
|
|
type WafRuleGroupGetRulesRetType = []WafRule
|
|
|
|
func getWafRuleGroupGetRulesAttributeTypeOk(arg WafRuleGroupGetRulesAttributeType) (ret WafRuleGroupGetRulesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleGroupGetRulesAttributeType(arg *WafRuleGroupGetRulesAttributeType, val WafRuleGroupGetRulesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// WafRuleGroup struct for WafRuleGroup
|
|
type WafRuleGroup struct {
|
|
// LocalizedString is a map from language to string value
|
|
// REQUIRED
|
|
Description WafRuleGroupGetDescriptionAttributeType `json:"description" required:"true"`
|
|
// LocalizedString is a map from language to string value
|
|
// REQUIRED
|
|
Name WafRuleGroupGetNameAttributeType `json:"name" required:"true"`
|
|
// REQUIRED
|
|
Rules WafRuleGroupGetRulesAttributeType `json:"rules" required:"true"`
|
|
}
|
|
|
|
type _WafRuleGroup WafRuleGroup
|
|
|
|
// NewWafRuleGroup instantiates a new WafRuleGroup 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 NewWafRuleGroup(description WafRuleGroupGetDescriptionArgType, name WafRuleGroupGetNameArgType, rules WafRuleGroupGetRulesArgType) *WafRuleGroup {
|
|
this := WafRuleGroup{}
|
|
setWafRuleGroupGetDescriptionAttributeType(&this.Description, description)
|
|
setWafRuleGroupGetNameAttributeType(&this.Name, name)
|
|
setWafRuleGroupGetRulesAttributeType(&this.Rules, rules)
|
|
return &this
|
|
}
|
|
|
|
// NewWafRuleGroupWithDefaults instantiates a new WafRuleGroup 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 NewWafRuleGroupWithDefaults() *WafRuleGroup {
|
|
this := WafRuleGroup{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value
|
|
func (o *WafRuleGroup) GetDescription() (ret WafRuleGroupGetDescriptionRetType) {
|
|
ret, _ = o.GetDescriptionOk()
|
|
return ret
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WafRuleGroup) GetDescriptionOk() (ret WafRuleGroupGetDescriptionRetType, ok bool) {
|
|
return getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description)
|
|
}
|
|
|
|
// SetDescription sets field value
|
|
func (o *WafRuleGroup) SetDescription(v WafRuleGroupGetDescriptionRetType) {
|
|
setWafRuleGroupGetDescriptionAttributeType(&o.Description, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *WafRuleGroup) GetName() (ret WafRuleGroupGetNameRetType) {
|
|
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 *WafRuleGroup) GetNameOk() (ret WafRuleGroupGetNameRetType, ok bool) {
|
|
return getWafRuleGroupGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *WafRuleGroup) SetName(v WafRuleGroupGetNameRetType) {
|
|
setWafRuleGroupGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRules returns the Rules field value
|
|
func (o *WafRuleGroup) GetRules() (ret WafRuleGroupGetRulesRetType) {
|
|
ret, _ = o.GetRulesOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRulesOk returns a tuple with the Rules field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WafRuleGroup) GetRulesOk() (ret WafRuleGroupGetRulesRetType, ok bool) {
|
|
return getWafRuleGroupGetRulesAttributeTypeOk(o.Rules)
|
|
}
|
|
|
|
// SetRules sets field value
|
|
func (o *WafRuleGroup) SetRules(v WafRuleGroupGetRulesRetType) {
|
|
setWafRuleGroupGetRulesAttributeType(&o.Rules, v)
|
|
}
|
|
|
|
func (o WafRuleGroup) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getWafRuleGroupGetDescriptionAttributeTypeOk(o.Description); ok {
|
|
toSerialize["Description"] = val
|
|
}
|
|
if val, ok := getWafRuleGroupGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getWafRuleGroupGetRulesAttributeTypeOk(o.Rules); ok {
|
|
toSerialize["Rules"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableWafRuleGroup struct {
|
|
value *WafRuleGroup
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWafRuleGroup) Get() *WafRuleGroup {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWafRuleGroup) Set(val *WafRuleGroup) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWafRuleGroup) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWafRuleGroup) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWafRuleGroup(val *WafRuleGroup) *NullableWafRuleGroup {
|
|
return &NullableWafRuleGroup{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWafRuleGroup) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWafRuleGroup) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|