## 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>
176 lines
6.1 KiB
Go
176 lines
6.1 KiB
Go
/*
|
|
STACKIT Application Load Balancer Web Application Firewall API
|
|
|
|
Generate a Web Application Firewall (WAF) to use with Application Load Balancers (ALB). The name of the WAF configuration is used in the listener of the ALB. This will activate the WAF for that ALB. An ALB with a WAF can have OWASP core rule set enabled and in addition can have custom rule configurations. To create a WAF one first needs to create all the configurations that are referenced in the WAF configuration. Currently this only consists of a rule configuration, which is written in Seclang. Once all configurations are created and referenced in the WAF configuration it can be used with an ALB. Currently updating a WAF configuration will not update an existing ALB until the Load Balancer VMs are restarted.
|
|
|
|
API version: 1alpha.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package albwafalpha
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the ListRulesResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ListRulesResponse{}
|
|
|
|
/*
|
|
types and functions for items
|
|
*/
|
|
|
|
// isArray
|
|
type ListRulesResponseGetItemsAttributeType = *[]GetRulesResponse
|
|
type ListRulesResponseGetItemsArgType = []GetRulesResponse
|
|
type ListRulesResponseGetItemsRetType = []GetRulesResponse
|
|
|
|
func getListRulesResponseGetItemsAttributeTypeOk(arg ListRulesResponseGetItemsAttributeType) (ret ListRulesResponseGetItemsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setListRulesResponseGetItemsAttributeType(arg *ListRulesResponseGetItemsAttributeType, val ListRulesResponseGetItemsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for nextPageId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type ListRulesResponseGetNextPageIdAttributeType = *string
|
|
|
|
func getListRulesResponseGetNextPageIdAttributeTypeOk(arg ListRulesResponseGetNextPageIdAttributeType) (ret ListRulesResponseGetNextPageIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setListRulesResponseGetNextPageIdAttributeType(arg *ListRulesResponseGetNextPageIdAttributeType, val ListRulesResponseGetNextPageIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type ListRulesResponseGetNextPageIdArgType = string
|
|
type ListRulesResponseGetNextPageIdRetType = string
|
|
|
|
// ListRulesResponse ListRulesResponse returns a list of rule configuration responses.
|
|
type ListRulesResponse struct {
|
|
Items ListRulesResponseGetItemsAttributeType `json:"items,omitempty"`
|
|
// Continue token from the ListRulesResponse with Limit option
|
|
NextPageId ListRulesResponseGetNextPageIdAttributeType `json:"nextPageId,omitempty"`
|
|
}
|
|
|
|
// NewListRulesResponse instantiates a new ListRulesResponse 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 NewListRulesResponse() *ListRulesResponse {
|
|
this := ListRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewListRulesResponseWithDefaults instantiates a new ListRulesResponse 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 NewListRulesResponseWithDefaults() *ListRulesResponse {
|
|
this := ListRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetItems returns the Items field value if set, zero value otherwise.
|
|
func (o *ListRulesResponse) GetItems() (res ListRulesResponseGetItemsRetType) {
|
|
res, _ = o.GetItemsOk()
|
|
return
|
|
}
|
|
|
|
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ListRulesResponse) GetItemsOk() (ret ListRulesResponseGetItemsRetType, ok bool) {
|
|
return getListRulesResponseGetItemsAttributeTypeOk(o.Items)
|
|
}
|
|
|
|
// HasItems returns a boolean if a field has been set.
|
|
func (o *ListRulesResponse) HasItems() bool {
|
|
_, ok := o.GetItemsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetItems gets a reference to the given []GetRulesResponse and assigns it to the Items field.
|
|
func (o *ListRulesResponse) SetItems(v ListRulesResponseGetItemsRetType) {
|
|
setListRulesResponseGetItemsAttributeType(&o.Items, v)
|
|
}
|
|
|
|
// GetNextPageId returns the NextPageId field value if set, zero value otherwise.
|
|
func (o *ListRulesResponse) GetNextPageId() (res ListRulesResponseGetNextPageIdRetType) {
|
|
res, _ = o.GetNextPageIdOk()
|
|
return
|
|
}
|
|
|
|
// GetNextPageIdOk returns a tuple with the NextPageId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ListRulesResponse) GetNextPageIdOk() (ret ListRulesResponseGetNextPageIdRetType, ok bool) {
|
|
return getListRulesResponseGetNextPageIdAttributeTypeOk(o.NextPageId)
|
|
}
|
|
|
|
// HasNextPageId returns a boolean if a field has been set.
|
|
func (o *ListRulesResponse) HasNextPageId() bool {
|
|
_, ok := o.GetNextPageIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetNextPageId gets a reference to the given string and assigns it to the NextPageId field.
|
|
func (o *ListRulesResponse) SetNextPageId(v ListRulesResponseGetNextPageIdRetType) {
|
|
setListRulesResponseGetNextPageIdAttributeType(&o.NextPageId, v)
|
|
}
|
|
|
|
func (o ListRulesResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getListRulesResponseGetItemsAttributeTypeOk(o.Items); ok {
|
|
toSerialize["Items"] = val
|
|
}
|
|
if val, ok := getListRulesResponseGetNextPageIdAttributeTypeOk(o.NextPageId); ok {
|
|
toSerialize["NextPageId"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableListRulesResponse struct {
|
|
value *ListRulesResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableListRulesResponse) Get() *ListRulesResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableListRulesResponse) Set(val *ListRulesResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableListRulesResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableListRulesResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableListRulesResponse(val *ListRulesResponse) *NullableListRulesResponse {
|
|
return &NullableListRulesResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableListRulesResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableListRulesResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|