## 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.3 KiB
Go
213 lines
6.3 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 WafRuleCollection type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &WafRuleCollection{}
|
|
|
|
/*
|
|
types and functions for groups
|
|
*/
|
|
|
|
// isArray
|
|
type WafRuleCollectionGetGroupsAttributeType = *[]WafRuleGroup
|
|
type WafRuleCollectionGetGroupsArgType = []WafRuleGroup
|
|
type WafRuleCollectionGetGroupsRetType = []WafRuleGroup
|
|
|
|
func getWafRuleCollectionGetGroupsAttributeTypeOk(arg WafRuleCollectionGetGroupsAttributeType) (ret WafRuleCollectionGetGroupsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleCollectionGetGroupsAttributeType(arg *WafRuleCollectionGetGroupsAttributeType, val WafRuleCollectionGetGroupsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for id
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type WafRuleCollectionGetIdAttributeType = *string
|
|
|
|
func getWafRuleCollectionGetIdAttributeTypeOk(arg WafRuleCollectionGetIdAttributeType) (ret WafRuleCollectionGetIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleCollectionGetIdAttributeType(arg *WafRuleCollectionGetIdAttributeType, val WafRuleCollectionGetIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type WafRuleCollectionGetIdArgType = string
|
|
type WafRuleCollectionGetIdRetType = string
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isContainer
|
|
type WafRuleCollectionGetNameAttributeType = *map[string]string
|
|
type WafRuleCollectionGetNameArgType = map[string]string
|
|
type WafRuleCollectionGetNameRetType = map[string]string
|
|
|
|
func getWafRuleCollectionGetNameAttributeTypeOk(arg WafRuleCollectionGetNameAttributeType) (ret WafRuleCollectionGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setWafRuleCollectionGetNameAttributeType(arg *WafRuleCollectionGetNameAttributeType, val WafRuleCollectionGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
// WafRuleCollection struct for WafRuleCollection
|
|
type WafRuleCollection struct {
|
|
// REQUIRED
|
|
Groups WafRuleCollectionGetGroupsAttributeType `json:"groups" required:"true"`
|
|
// REQUIRED
|
|
Id WafRuleCollectionGetIdAttributeType `json:"id" required:"true"`
|
|
// LocalizedString is a map from language to string value
|
|
// REQUIRED
|
|
Name WafRuleCollectionGetNameAttributeType `json:"name" required:"true"`
|
|
}
|
|
|
|
type _WafRuleCollection WafRuleCollection
|
|
|
|
// NewWafRuleCollection instantiates a new WafRuleCollection 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 NewWafRuleCollection(groups WafRuleCollectionGetGroupsArgType, id WafRuleCollectionGetIdArgType, name WafRuleCollectionGetNameArgType) *WafRuleCollection {
|
|
this := WafRuleCollection{}
|
|
setWafRuleCollectionGetGroupsAttributeType(&this.Groups, groups)
|
|
setWafRuleCollectionGetIdAttributeType(&this.Id, id)
|
|
setWafRuleCollectionGetNameAttributeType(&this.Name, name)
|
|
return &this
|
|
}
|
|
|
|
// NewWafRuleCollectionWithDefaults instantiates a new WafRuleCollection 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 NewWafRuleCollectionWithDefaults() *WafRuleCollection {
|
|
this := WafRuleCollection{}
|
|
return &this
|
|
}
|
|
|
|
// GetGroups returns the Groups field value
|
|
func (o *WafRuleCollection) GetGroups() (ret WafRuleCollectionGetGroupsRetType) {
|
|
ret, _ = o.GetGroupsOk()
|
|
return ret
|
|
}
|
|
|
|
// GetGroupsOk returns a tuple with the Groups field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WafRuleCollection) GetGroupsOk() (ret WafRuleCollectionGetGroupsRetType, ok bool) {
|
|
return getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups)
|
|
}
|
|
|
|
// SetGroups sets field value
|
|
func (o *WafRuleCollection) SetGroups(v WafRuleCollectionGetGroupsRetType) {
|
|
setWafRuleCollectionGetGroupsAttributeType(&o.Groups, v)
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *WafRuleCollection) GetId() (ret WafRuleCollectionGetIdRetType) {
|
|
ret, _ = o.GetIdOk()
|
|
return ret
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WafRuleCollection) GetIdOk() (ret WafRuleCollectionGetIdRetType, ok bool) {
|
|
return getWafRuleCollectionGetIdAttributeTypeOk(o.Id)
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *WafRuleCollection) SetId(v WafRuleCollectionGetIdRetType) {
|
|
setWafRuleCollectionGetIdAttributeType(&o.Id, v)
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *WafRuleCollection) GetName() (ret WafRuleCollectionGetNameRetType) {
|
|
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 *WafRuleCollection) GetNameOk() (ret WafRuleCollectionGetNameRetType, ok bool) {
|
|
return getWafRuleCollectionGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *WafRuleCollection) SetName(v WafRuleCollectionGetNameRetType) {
|
|
setWafRuleCollectionGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
func (o WafRuleCollection) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getWafRuleCollectionGetGroupsAttributeTypeOk(o.Groups); ok {
|
|
toSerialize["Groups"] = val
|
|
}
|
|
if val, ok := getWafRuleCollectionGetIdAttributeTypeOk(o.Id); ok {
|
|
toSerialize["Id"] = val
|
|
}
|
|
if val, ok := getWafRuleCollectionGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableWafRuleCollection struct {
|
|
value *WafRuleCollection
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWafRuleCollection) Get() *WafRuleCollection {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWafRuleCollection) Set(val *WafRuleCollection) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWafRuleCollection) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWafRuleCollection) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWafRuleCollection(val *WafRuleCollection) *NullableWafRuleCollection {
|
|
return &NullableWafRuleCollection{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWafRuleCollection) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWafRuleCollection) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|