/* 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 GetWAFResponse type satisfies the MappedNullable interface at compile time var _ MappedNullable = &GetWAFResponse{} /* types and functions for coreRuleSetName */ // isNotNullableString type GetWAFResponseGetCoreRuleSetNameAttributeType = *string func getGetWAFResponseGetCoreRuleSetNameAttributeTypeOk(arg GetWAFResponseGetCoreRuleSetNameAttributeType) (ret GetWAFResponseGetCoreRuleSetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetWAFResponseGetCoreRuleSetNameAttributeType(arg *GetWAFResponseGetCoreRuleSetNameAttributeType, val GetWAFResponseGetCoreRuleSetNameRetType) { *arg = &val } type GetWAFResponseGetCoreRuleSetNameArgType = string type GetWAFResponseGetCoreRuleSetNameRetType = string /* types and functions for name */ // isNotNullableString type GetWAFResponseGetNameAttributeType = *string func getGetWAFResponseGetNameAttributeTypeOk(arg GetWAFResponseGetNameAttributeType) (ret GetWAFResponseGetNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetWAFResponseGetNameAttributeType(arg *GetWAFResponseGetNameAttributeType, val GetWAFResponseGetNameRetType) { *arg = &val } type GetWAFResponseGetNameArgType = string type GetWAFResponseGetNameRetType = string /* types and functions for region */ // isNotNullableString type GetWAFResponseGetRegionAttributeType = *string func getGetWAFResponseGetRegionAttributeTypeOk(arg GetWAFResponseGetRegionAttributeType) (ret GetWAFResponseGetRegionRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetWAFResponseGetRegionAttributeType(arg *GetWAFResponseGetRegionAttributeType, val GetWAFResponseGetRegionRetType) { *arg = &val } type GetWAFResponseGetRegionArgType = string type GetWAFResponseGetRegionRetType = string /* types and functions for rulesConfigName */ // isNotNullableString type GetWAFResponseGetRulesConfigNameAttributeType = *string func getGetWAFResponseGetRulesConfigNameAttributeTypeOk(arg GetWAFResponseGetRulesConfigNameAttributeType) (ret GetWAFResponseGetRulesConfigNameRetType, ok bool) { if arg == nil { return ret, false } return *arg, true } func setGetWAFResponseGetRulesConfigNameAttributeType(arg *GetWAFResponseGetRulesConfigNameAttributeType, val GetWAFResponseGetRulesConfigNameRetType) { *arg = &val } type GetWAFResponseGetRulesConfigNameArgType = string type GetWAFResponseGetRulesConfigNameRetType = string // GetWAFResponse GetWAFResponse returns id, name and custom rules. type GetWAFResponse struct { // Name of the core rule set configuration for that WAF. CoreRuleSetName GetWAFResponseGetCoreRuleSetNameAttributeType `json:"coreRuleSetName,omitempty"` // WAF name Name GetWAFResponseGetNameAttributeType `json:"name,omitempty"` // Region Region GetWAFResponseGetRegionAttributeType `json:"region,omitempty"` // Name of the rule configuration for that WAF. RulesConfigName GetWAFResponseGetRulesConfigNameAttributeType `json:"rulesConfigName,omitempty"` } // NewGetWAFResponse instantiates a new GetWAFResponse 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 NewGetWAFResponse() *GetWAFResponse { this := GetWAFResponse{} return &this } // NewGetWAFResponseWithDefaults instantiates a new GetWAFResponse 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 NewGetWAFResponseWithDefaults() *GetWAFResponse { this := GetWAFResponse{} return &this } // GetCoreRuleSetName returns the CoreRuleSetName field value if set, zero value otherwise. func (o *GetWAFResponse) GetCoreRuleSetName() (res GetWAFResponseGetCoreRuleSetNameRetType) { res, _ = o.GetCoreRuleSetNameOk() return } // GetCoreRuleSetNameOk returns a tuple with the CoreRuleSetName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetWAFResponse) GetCoreRuleSetNameOk() (ret GetWAFResponseGetCoreRuleSetNameRetType, ok bool) { return getGetWAFResponseGetCoreRuleSetNameAttributeTypeOk(o.CoreRuleSetName) } // HasCoreRuleSetName returns a boolean if a field has been set. func (o *GetWAFResponse) HasCoreRuleSetName() bool { _, ok := o.GetCoreRuleSetNameOk() return ok } // SetCoreRuleSetName gets a reference to the given string and assigns it to the CoreRuleSetName field. func (o *GetWAFResponse) SetCoreRuleSetName(v GetWAFResponseGetCoreRuleSetNameRetType) { setGetWAFResponseGetCoreRuleSetNameAttributeType(&o.CoreRuleSetName, v) } // GetName returns the Name field value if set, zero value otherwise. func (o *GetWAFResponse) GetName() (res GetWAFResponseGetNameRetType) { 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 *GetWAFResponse) GetNameOk() (ret GetWAFResponseGetNameRetType, ok bool) { return getGetWAFResponseGetNameAttributeTypeOk(o.Name) } // HasName returns a boolean if a field has been set. func (o *GetWAFResponse) HasName() bool { _, ok := o.GetNameOk() return ok } // SetName gets a reference to the given string and assigns it to the Name field. func (o *GetWAFResponse) SetName(v GetWAFResponseGetNameRetType) { setGetWAFResponseGetNameAttributeType(&o.Name, v) } // GetRegion returns the Region field value if set, zero value otherwise. func (o *GetWAFResponse) GetRegion() (res GetWAFResponseGetRegionRetType) { 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 *GetWAFResponse) GetRegionOk() (ret GetWAFResponseGetRegionRetType, ok bool) { return getGetWAFResponseGetRegionAttributeTypeOk(o.Region) } // HasRegion returns a boolean if a field has been set. func (o *GetWAFResponse) HasRegion() bool { _, ok := o.GetRegionOk() return ok } // SetRegion gets a reference to the given string and assigns it to the Region field. func (o *GetWAFResponse) SetRegion(v GetWAFResponseGetRegionRetType) { setGetWAFResponseGetRegionAttributeType(&o.Region, v) } // GetRulesConfigName returns the RulesConfigName field value if set, zero value otherwise. func (o *GetWAFResponse) GetRulesConfigName() (res GetWAFResponseGetRulesConfigNameRetType) { res, _ = o.GetRulesConfigNameOk() return } // GetRulesConfigNameOk returns a tuple with the RulesConfigName field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *GetWAFResponse) GetRulesConfigNameOk() (ret GetWAFResponseGetRulesConfigNameRetType, ok bool) { return getGetWAFResponseGetRulesConfigNameAttributeTypeOk(o.RulesConfigName) } // HasRulesConfigName returns a boolean if a field has been set. func (o *GetWAFResponse) HasRulesConfigName() bool { _, ok := o.GetRulesConfigNameOk() return ok } // SetRulesConfigName gets a reference to the given string and assigns it to the RulesConfigName field. func (o *GetWAFResponse) SetRulesConfigName(v GetWAFResponseGetRulesConfigNameRetType) { setGetWAFResponseGetRulesConfigNameAttributeType(&o.RulesConfigName, v) } func (o GetWAFResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if val, ok := getGetWAFResponseGetCoreRuleSetNameAttributeTypeOk(o.CoreRuleSetName); ok { toSerialize["CoreRuleSetName"] = val } if val, ok := getGetWAFResponseGetNameAttributeTypeOk(o.Name); ok { toSerialize["Name"] = val } if val, ok := getGetWAFResponseGetRegionAttributeTypeOk(o.Region); ok { toSerialize["Region"] = val } if val, ok := getGetWAFResponseGetRulesConfigNameAttributeTypeOk(o.RulesConfigName); ok { toSerialize["RulesConfigName"] = val } return toSerialize, nil } type NullableGetWAFResponse struct { value *GetWAFResponse isSet bool } func (v NullableGetWAFResponse) Get() *GetWAFResponse { return v.value } func (v *NullableGetWAFResponse) Set(val *GetWAFResponse) { v.value = val v.isSet = true } func (v NullableGetWAFResponse) IsSet() bool { return v.isSet } func (v *NullableGetWAFResponse) Unset() { v.value = nil v.isSet = false } func NewNullableGetWAFResponse(val *GetWAFResponse) *NullableGetWAFResponse { return &NullableGetWAFResponse{value: val, isSet: true} } func (v NullableGetWAFResponse) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableGetWAFResponse) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }