227 lines
7.4 KiB
Go
227 lines
7.4 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 GetRulesResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GetRulesResponse{}
|
|
|
|
/*
|
|
types and functions for name
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetRulesResponseGetNameAttributeType = *string
|
|
|
|
func getGetRulesResponseGetNameAttributeTypeOk(arg GetRulesResponseGetNameAttributeType) (ret GetRulesResponseGetNameRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetRulesResponseGetNameAttributeType(arg *GetRulesResponseGetNameAttributeType, val GetRulesResponseGetNameRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetRulesResponseGetNameArgType = string
|
|
type GetRulesResponseGetNameRetType = string
|
|
|
|
/*
|
|
types and functions for region
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetRulesResponseGetRegionAttributeType = *string
|
|
|
|
func getGetRulesResponseGetRegionAttributeTypeOk(arg GetRulesResponseGetRegionAttributeType) (ret GetRulesResponseGetRegionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetRulesResponseGetRegionAttributeType(arg *GetRulesResponseGetRegionAttributeType, val GetRulesResponseGetRegionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetRulesResponseGetRegionArgType = string
|
|
type GetRulesResponseGetRegionRetType = string
|
|
|
|
/*
|
|
types and functions for rules
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GetRulesResponseGetRulesAttributeType = *string
|
|
|
|
func getGetRulesResponseGetRulesAttributeTypeOk(arg GetRulesResponseGetRulesAttributeType) (ret GetRulesResponseGetRulesRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGetRulesResponseGetRulesAttributeType(arg *GetRulesResponseGetRulesAttributeType, val GetRulesResponseGetRulesRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GetRulesResponseGetRulesArgType = string
|
|
type GetRulesResponseGetRulesRetType = string
|
|
|
|
// GetRulesResponse GetRulesResponse returns rule configuration name and it's rules.
|
|
type GetRulesResponse struct {
|
|
// Rule configuration name.
|
|
Name GetRulesResponseGetNameAttributeType `json:"name,omitempty"`
|
|
// Region
|
|
Region GetRulesResponseGetRegionAttributeType `json:"region,omitempty"`
|
|
// Custom rules written in Seclang syntax.
|
|
Rules GetRulesResponseGetRulesAttributeType `json:"rules,omitempty"`
|
|
}
|
|
|
|
// NewGetRulesResponse instantiates a new GetRulesResponse 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 NewGetRulesResponse() *GetRulesResponse {
|
|
this := GetRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewGetRulesResponseWithDefaults instantiates a new GetRulesResponse 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 NewGetRulesResponseWithDefaults() *GetRulesResponse {
|
|
this := GetRulesResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *GetRulesResponse) GetName() (res GetRulesResponseGetNameRetType) {
|
|
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 *GetRulesResponse) GetNameOk() (ret GetRulesResponseGetNameRetType, ok bool) {
|
|
return getGetRulesResponseGetNameAttributeTypeOk(o.Name)
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *GetRulesResponse) HasName() bool {
|
|
_, ok := o.GetNameOk()
|
|
return ok
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *GetRulesResponse) SetName(v GetRulesResponseGetNameRetType) {
|
|
setGetRulesResponseGetNameAttributeType(&o.Name, v)
|
|
}
|
|
|
|
// GetRegion returns the Region field value if set, zero value otherwise.
|
|
func (o *GetRulesResponse) GetRegion() (res GetRulesResponseGetRegionRetType) {
|
|
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 *GetRulesResponse) GetRegionOk() (ret GetRulesResponseGetRegionRetType, ok bool) {
|
|
return getGetRulesResponseGetRegionAttributeTypeOk(o.Region)
|
|
}
|
|
|
|
// HasRegion returns a boolean if a field has been set.
|
|
func (o *GetRulesResponse) HasRegion() bool {
|
|
_, ok := o.GetRegionOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRegion gets a reference to the given string and assigns it to the Region field.
|
|
func (o *GetRulesResponse) SetRegion(v GetRulesResponseGetRegionRetType) {
|
|
setGetRulesResponseGetRegionAttributeType(&o.Region, v)
|
|
}
|
|
|
|
// GetRules returns the Rules field value if set, zero value otherwise.
|
|
func (o *GetRulesResponse) GetRules() (res GetRulesResponseGetRulesRetType) {
|
|
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 *GetRulesResponse) GetRulesOk() (ret GetRulesResponseGetRulesRetType, ok bool) {
|
|
return getGetRulesResponseGetRulesAttributeTypeOk(o.Rules)
|
|
}
|
|
|
|
// HasRules returns a boolean if a field has been set.
|
|
func (o *GetRulesResponse) HasRules() bool {
|
|
_, ok := o.GetRulesOk()
|
|
return ok
|
|
}
|
|
|
|
// SetRules gets a reference to the given string and assigns it to the Rules field.
|
|
func (o *GetRulesResponse) SetRules(v GetRulesResponseGetRulesRetType) {
|
|
setGetRulesResponseGetRulesAttributeType(&o.Rules, v)
|
|
}
|
|
|
|
func (o GetRulesResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getGetRulesResponseGetNameAttributeTypeOk(o.Name); ok {
|
|
toSerialize["Name"] = val
|
|
}
|
|
if val, ok := getGetRulesResponseGetRegionAttributeTypeOk(o.Region); ok {
|
|
toSerialize["Region"] = val
|
|
}
|
|
if val, ok := getGetRulesResponseGetRulesAttributeTypeOk(o.Rules); ok {
|
|
toSerialize["Rules"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableGetRulesResponse struct {
|
|
value *GetRulesResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGetRulesResponse) Get() *GetRulesResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGetRulesResponse) Set(val *GetRulesResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGetRulesResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGetRulesResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGetRulesResponse(val *GetRulesResponse) *NullableGetRulesResponse {
|
|
return &NullableGetRulesResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGetRulesResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGetRulesResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|