227 lines
7.7 KiB
Go
227 lines
7.7 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 CreateRulesResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CreateRulesResponse{}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateRulesResponseGetNameAttributeType = *string
|
|
|
|
func getCreateRulesResponseGetNameAttributeTypeOk(arg CreateRulesResponseGetNameAttributeType) (ret CreateRulesResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateRulesResponseGetNameAttributeType(arg *CreateRulesResponseGetNameAttributeType, val CreateRulesResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateRulesResponseGetNameArgType = string
|
|
type CreateRulesResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for region
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateRulesResponseGetRegionAttributeType = *string
|
|
|
|
func getCreateRulesResponseGetRegionAttributeTypeOk(arg CreateRulesResponseGetRegionAttributeType) (ret CreateRulesResponseGetRegionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateRulesResponseGetRegionAttributeType(arg *CreateRulesResponseGetRegionAttributeType, val CreateRulesResponseGetRegionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateRulesResponseGetRegionArgType = string
|
|
type CreateRulesResponseGetRegionRetType = string
|
|
|
|
/*
|
|
types and functions for rules
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type CreateRulesResponseGetRulesAttributeType = *string
|
|
|
|
func getCreateRulesResponseGetRulesAttributeTypeOk(arg CreateRulesResponseGetRulesAttributeType) (ret CreateRulesResponseGetRulesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setCreateRulesResponseGetRulesAttributeType(arg *CreateRulesResponseGetRulesAttributeType, val CreateRulesResponseGetRulesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type CreateRulesResponseGetRulesArgType = string
|
|
type CreateRulesResponseGetRulesRetType = string
|
|
|
|
// CreateRulesResponse CreateRulesResponse returns rule configuration name and it's rules.
|
|
type CreateRulesResponse struct {
|
|
// Rule configuration name.
|
|
Name CreateRulesResponseGetNameAttributeType `json:"name,omitempty"`
|
|
// Region
|
|
Region CreateRulesResponseGetRegionAttributeType `json:"region,omitempty"`
|
|
// Custom rules written in Seclang syntax.
|
|
Rules CreateRulesResponseGetRulesAttributeType `json:"rules,omitempty"`
|
|
}
|
|
|
|
// NewCreateRulesResponse instantiates a new CreateRulesResponse 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 NewCreateRulesResponse() *CreateRulesResponse {
|
|
this := CreateRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewCreateRulesResponseWithDefaults instantiates a new CreateRulesResponse 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 NewCreateRulesResponseWithDefaults() *CreateRulesResponse {
|
|
this := CreateRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *CreateRulesResponse) GetName() (res CreateRulesResponseGetNameRetType) {
|
|
res, _ = o.GetNameOk()
|
|
return
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateRulesResponse) GetNameOk() (ret CreateRulesResponseGetNameRetType, ok bool) {
|
|
return getCreateRulesResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *CreateRulesResponse) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *CreateRulesResponse) SetName(v CreateRulesResponseGetNameRetType) {
|
|
setCreateRulesResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
|
func (o *CreateRulesResponse) GetRegion() (res CreateRulesResponseGetRegionRetType) {
|
|
res, _ = o.GetRegionOk()
|
|
return
|
|
}
|
|
|
|
// GetRegionOk returns a tuple with the Region field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateRulesResponse) GetRegionOk() (ret CreateRulesResponseGetRegionRetType, ok bool) {
|
|
return getCreateRulesResponseGetRegionAttributeTypeOk(o.Region)
|
|
}
|
|
|
|
// HasRegion returns a boolean if a field has been set.
|
|
func (o *CreateRulesResponse) HasRegion() bool {
|
|
_, ok := o.GetRegionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
|
func (o *CreateRulesResponse) SetRegion(v CreateRulesResponseGetRegionRetType) {
|
|
setCreateRulesResponseGetRegionAttributeType(&o.Region, v)
|
|
}
|
|
|
|
// GetRules returns the Rules field value if set, zero value otherwise.
|
|
func (o *CreateRulesResponse) GetRules() (res CreateRulesResponseGetRulesRetType) {
|
|
res, _ = o.GetRulesOk()
|
|
return
|
|
}
|
|
|
|
// GetRulesOk returns a tuple with the Rules field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CreateRulesResponse) GetRulesOk() (ret CreateRulesResponseGetRulesRetType, ok bool) {
|
|
return getCreateRulesResponseGetRulesAttributeTypeOk(o.Rules)
|
|
}
|
|
|
|
// HasRules returns a boolean if a field has been set.
|
|
func (o *CreateRulesResponse) HasRules() bool {
|
|
_, ok := o.GetRulesOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRules gets a reference to the given string and assigns it to the Rules field.
|
|
func (o *CreateRulesResponse) SetRules(v CreateRulesResponseGetRulesRetType) {
|
|
setCreateRulesResponseGetRulesAttributeType(&o.Rules, v)
|
|
}
|
|
|
|
func (o CreateRulesResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getCreateRulesResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getCreateRulesResponseGetRegionAttributeTypeOk(o.Region); ok {
|
|
toSerialize["Region"] = val
|
|
}
|
|
if val, ok := getCreateRulesResponseGetRulesAttributeTypeOk(o.Rules); ok {
|
|
toSerialize["Rules"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCreateRulesResponse struct {
|
|
value *CreateRulesResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCreateRulesResponse) Get() *CreateRulesResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCreateRulesResponse) Set(val *CreateRulesResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCreateRulesResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCreateRulesResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCreateRulesResponse(val *CreateRulesResponse) *NullableCreateRulesResponse {
|
|
return &NullableCreateRulesResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCreateRulesResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCreateRulesResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|