terraform-provider-stackitp.../pkg/albwafalpha/model_update_rules_payload.go
Marcel S. Henselin 9f41c4da7f
Some checks failed
Publish / Check GoReleaser config (push) Successful in 4s
Release / goreleaser (push) Failing after 29s
Publish / Publish provider (push) Failing after 4m24s
feat: auto generated files and new structure (#4)
## 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>
2026-01-29 14:10:25 +00:00

276 lines
9.3 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 UpdateRulesPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateRulesPayload{}
/*
types and functions for name
*/
// isNotNullableString
type UpdateRulesPayloadGetNameAttributeType = *string
func getUpdateRulesPayloadGetNameAttributeTypeOk(arg UpdateRulesPayloadGetNameAttributeType) (ret UpdateRulesPayloadGetNameRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateRulesPayloadGetNameAttributeType(arg *UpdateRulesPayloadGetNameAttributeType, val UpdateRulesPayloadGetNameRetType) {
*arg = &val
}
type UpdateRulesPayloadGetNameArgType = string
type UpdateRulesPayloadGetNameRetType = string
/*
types and functions for projectId
*/
// isNotNullableString
type UpdateRulesPayloadGetProjectIdAttributeType = *string
func getUpdateRulesPayloadGetProjectIdAttributeTypeOk(arg UpdateRulesPayloadGetProjectIdAttributeType) (ret UpdateRulesPayloadGetProjectIdRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateRulesPayloadGetProjectIdAttributeType(arg *UpdateRulesPayloadGetProjectIdAttributeType, val UpdateRulesPayloadGetProjectIdRetType) {
*arg = &val
}
type UpdateRulesPayloadGetProjectIdArgType = string
type UpdateRulesPayloadGetProjectIdRetType = string
/*
types and functions for region
*/
// isNotNullableString
type UpdateRulesPayloadGetRegionAttributeType = *string
func getUpdateRulesPayloadGetRegionAttributeTypeOk(arg UpdateRulesPayloadGetRegionAttributeType) (ret UpdateRulesPayloadGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateRulesPayloadGetRegionAttributeType(arg *UpdateRulesPayloadGetRegionAttributeType, val UpdateRulesPayloadGetRegionRetType) {
*arg = &val
}
type UpdateRulesPayloadGetRegionArgType = string
type UpdateRulesPayloadGetRegionRetType = string
/*
types and functions for rules
*/
// isNotNullableString
type UpdateRulesPayloadGetRulesAttributeType = *string
func getUpdateRulesPayloadGetRulesAttributeTypeOk(arg UpdateRulesPayloadGetRulesAttributeType) (ret UpdateRulesPayloadGetRulesRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setUpdateRulesPayloadGetRulesAttributeType(arg *UpdateRulesPayloadGetRulesAttributeType, val UpdateRulesPayloadGetRulesRetType) {
*arg = &val
}
type UpdateRulesPayloadGetRulesArgType = string
type UpdateRulesPayloadGetRulesRetType = string
// UpdateRulesPayload UpdateRulesRequest updates a rules configuration, but only if it changed.
type UpdateRulesPayload struct {
// Rule configuration name.
Name UpdateRulesPayloadGetNameAttributeType `json:"name,omitempty"`
// Project identifier
ProjectId UpdateRulesPayloadGetProjectIdAttributeType `json:"projectId,omitempty"`
// Region
Region UpdateRulesPayloadGetRegionAttributeType `json:"region,omitempty"`
// Custom rules for WAF written in Seclang syntax.
Rules UpdateRulesPayloadGetRulesAttributeType `json:"rules,omitempty"`
}
// NewUpdateRulesPayload instantiates a new UpdateRulesPayload 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 NewUpdateRulesPayload() *UpdateRulesPayload {
this := UpdateRulesPayload{}
return &this
}
// NewUpdateRulesPayloadWithDefaults instantiates a new UpdateRulesPayload 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 NewUpdateRulesPayloadWithDefaults() *UpdateRulesPayload {
this := UpdateRulesPayload{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *UpdateRulesPayload) GetName() (res UpdateRulesPayloadGetNameRetType) {
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 *UpdateRulesPayload) GetNameOk() (ret UpdateRulesPayloadGetNameRetType, ok bool) {
return getUpdateRulesPayloadGetNameAttributeTypeOk(o.Name)
}
// HasName returns a boolean if a field has been set.
func (o *UpdateRulesPayload) HasName() bool {
_, ok := o.GetNameOk()
return ok
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *UpdateRulesPayload) SetName(v UpdateRulesPayloadGetNameRetType) {
setUpdateRulesPayloadGetNameAttributeType(&o.Name, v)
}
// GetProjectId returns the ProjectId field value if set, zero value otherwise.
func (o *UpdateRulesPayload) GetProjectId() (res UpdateRulesPayloadGetProjectIdRetType) {
res, _ = o.GetProjectIdOk()
return
}
// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateRulesPayload) GetProjectIdOk() (ret UpdateRulesPayloadGetProjectIdRetType, ok bool) {
return getUpdateRulesPayloadGetProjectIdAttributeTypeOk(o.ProjectId)
}
// HasProjectId returns a boolean if a field has been set.
func (o *UpdateRulesPayload) HasProjectId() bool {
_, ok := o.GetProjectIdOk()
return ok
}
// SetProjectId gets a reference to the given string and assigns it to the ProjectId field.
func (o *UpdateRulesPayload) SetProjectId(v UpdateRulesPayloadGetProjectIdRetType) {
setUpdateRulesPayloadGetProjectIdAttributeType(&o.ProjectId, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *UpdateRulesPayload) GetRegion() (res UpdateRulesPayloadGetRegionRetType) {
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 *UpdateRulesPayload) GetRegionOk() (ret UpdateRulesPayloadGetRegionRetType, ok bool) {
return getUpdateRulesPayloadGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *UpdateRulesPayload) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *UpdateRulesPayload) SetRegion(v UpdateRulesPayloadGetRegionRetType) {
setUpdateRulesPayloadGetRegionAttributeType(&o.Region, v)
}
// GetRules returns the Rules field value if set, zero value otherwise.
func (o *UpdateRulesPayload) GetRules() (res UpdateRulesPayloadGetRulesRetType) {
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 *UpdateRulesPayload) GetRulesOk() (ret UpdateRulesPayloadGetRulesRetType, ok bool) {
return getUpdateRulesPayloadGetRulesAttributeTypeOk(o.Rules)
}
// HasRules returns a boolean if a field has been set.
func (o *UpdateRulesPayload) HasRules() bool {
_, ok := o.GetRulesOk()
return ok
}
// SetRules gets a reference to the given string and assigns it to the Rules field.
func (o *UpdateRulesPayload) SetRules(v UpdateRulesPayloadGetRulesRetType) {
setUpdateRulesPayloadGetRulesAttributeType(&o.Rules, v)
}
func (o UpdateRulesPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getUpdateRulesPayloadGetNameAttributeTypeOk(o.Name); ok {
toSerialize["Name"] = val
}
if val, ok := getUpdateRulesPayloadGetProjectIdAttributeTypeOk(o.ProjectId); ok {
toSerialize["ProjectId"] = val
}
if val, ok := getUpdateRulesPayloadGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getUpdateRulesPayloadGetRulesAttributeTypeOk(o.Rules); ok {
toSerialize["Rules"] = val
}
return toSerialize, nil
}
type NullableUpdateRulesPayload struct {
value *UpdateRulesPayload
isSet bool
}
func (v NullableUpdateRulesPayload) Get() *UpdateRulesPayload {
return v.value
}
func (v *NullableUpdateRulesPayload) Set(val *UpdateRulesPayload) {
v.value = val
v.isSet = true
}
func (v NullableUpdateRulesPayload) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateRulesPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateRulesPayload(val *UpdateRulesPayload) *NullableUpdateRulesPayload {
return &NullableUpdateRulesPayload{value: val, isSet: true}
}
func (v NullableUpdateRulesPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateRulesPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}