terraform-provider-stackitp.../pkg/cdnbeta/model_http_backend_create.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

267 lines
9.6 KiB
Go

/*
CDN API
API used to create and manage your CDN distributions.
API version: 1beta2.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package cdnbeta
import (
"encoding/json"
)
// checks if the HttpBackendCreate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &HttpBackendCreate{}
/*
types and functions for geofencing
*/
// isContainer
type HttpBackendCreateGetGeofencingAttributeType = *map[string][]string
type HttpBackendCreateGetGeofencingArgType = map[string][]string
type HttpBackendCreateGetGeofencingRetType = map[string][]string
func getHttpBackendCreateGetGeofencingAttributeTypeOk(arg HttpBackendCreateGetGeofencingAttributeType) (ret HttpBackendCreateGetGeofencingRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setHttpBackendCreateGetGeofencingAttributeType(arg *HttpBackendCreateGetGeofencingAttributeType, val HttpBackendCreateGetGeofencingRetType) {
*arg = &val
}
/*
types and functions for originRequestHeaders
*/
// isContainer
type HttpBackendCreateGetOriginRequestHeadersAttributeType = *map[string]string
type HttpBackendCreateGetOriginRequestHeadersArgType = map[string]string
type HttpBackendCreateGetOriginRequestHeadersRetType = map[string]string
func getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(arg HttpBackendCreateGetOriginRequestHeadersAttributeType) (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setHttpBackendCreateGetOriginRequestHeadersAttributeType(arg *HttpBackendCreateGetOriginRequestHeadersAttributeType, val HttpBackendCreateGetOriginRequestHeadersRetType) {
*arg = &val
}
/*
types and functions for originUrl
*/
// isNotNullableString
type HttpBackendCreateGetOriginUrlAttributeType = *string
func getHttpBackendCreateGetOriginUrlAttributeTypeOk(arg HttpBackendCreateGetOriginUrlAttributeType) (ret HttpBackendCreateGetOriginUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setHttpBackendCreateGetOriginUrlAttributeType(arg *HttpBackendCreateGetOriginUrlAttributeType, val HttpBackendCreateGetOriginUrlRetType) {
*arg = &val
}
type HttpBackendCreateGetOriginUrlArgType = string
type HttpBackendCreateGetOriginUrlRetType = string
/*
types and functions for type
*/
// isNotNullableString
type HttpBackendCreateGetTypeAttributeType = *string
func getHttpBackendCreateGetTypeAttributeTypeOk(arg HttpBackendCreateGetTypeAttributeType) (ret HttpBackendCreateGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setHttpBackendCreateGetTypeAttributeType(arg *HttpBackendCreateGetTypeAttributeType, val HttpBackendCreateGetTypeRetType) {
*arg = &val
}
type HttpBackendCreateGetTypeArgType = string
type HttpBackendCreateGetTypeRetType = string
// HttpBackendCreate struct for HttpBackendCreate
type HttpBackendCreate struct {
// An object mapping multiple alternative origins to country codes. Any request from one of those country codes will route to the alternative origin. Do note that country codes may only be used once. You cannot have a country be assigned to multiple alternative origins.
Geofencing HttpBackendCreateGetGeofencingAttributeType `json:"geofencing,omitempty"`
// Headers that will be sent with every request to the configured origin. **WARNING**: Do not store sensitive values in the headers. The configuration is stored as plain text.
OriginRequestHeaders HttpBackendCreateGetOriginRequestHeadersAttributeType `json:"originRequestHeaders,omitempty"`
// The origin of the content that should be made available through the CDN. Note that the path and query parameters are ignored. Ports are allowed. If no protocol is provided, `https` is assumed. So `www.example.com:1234/somePath?q=123` is normalized to `https://www.example.com:1234`
// REQUIRED
OriginUrl HttpBackendCreateGetOriginUrlAttributeType `json:"originUrl" required:"true"`
// REQUIRED
Type HttpBackendCreateGetTypeAttributeType `json:"type" required:"true"`
}
type _HttpBackendCreate HttpBackendCreate
// NewHttpBackendCreate instantiates a new HttpBackendCreate 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 NewHttpBackendCreate(originUrl HttpBackendCreateGetOriginUrlArgType, types HttpBackendCreateGetTypeArgType) *HttpBackendCreate {
this := HttpBackendCreate{}
setHttpBackendCreateGetOriginUrlAttributeType(&this.OriginUrl, originUrl)
setHttpBackendCreateGetTypeAttributeType(&this.Type, types)
return &this
}
// NewHttpBackendCreateWithDefaults instantiates a new HttpBackendCreate 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 NewHttpBackendCreateWithDefaults() *HttpBackendCreate {
this := HttpBackendCreate{}
return &this
}
// GetGeofencing returns the Geofencing field value if set, zero value otherwise.
func (o *HttpBackendCreate) GetGeofencing() (res HttpBackendCreateGetGeofencingRetType) {
res, _ = o.GetGeofencingOk()
return
}
// GetGeofencingOk returns a tuple with the Geofencing field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HttpBackendCreate) GetGeofencingOk() (ret HttpBackendCreateGetGeofencingRetType, ok bool) {
return getHttpBackendCreateGetGeofencingAttributeTypeOk(o.Geofencing)
}
// HasGeofencing returns a boolean if a field has been set.
func (o *HttpBackendCreate) HasGeofencing() bool {
_, ok := o.GetGeofencingOk()
return ok
}
// SetGeofencing gets a reference to the given map[string][]string and assigns it to the Geofencing field.
func (o *HttpBackendCreate) SetGeofencing(v HttpBackendCreateGetGeofencingRetType) {
setHttpBackendCreateGetGeofencingAttributeType(&o.Geofencing, v)
}
// GetOriginRequestHeaders returns the OriginRequestHeaders field value if set, zero value otherwise.
func (o *HttpBackendCreate) GetOriginRequestHeaders() (res HttpBackendCreateGetOriginRequestHeadersRetType) {
res, _ = o.GetOriginRequestHeadersOk()
return
}
// GetOriginRequestHeadersOk returns a tuple with the OriginRequestHeaders field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *HttpBackendCreate) GetOriginRequestHeadersOk() (ret HttpBackendCreateGetOriginRequestHeadersRetType, ok bool) {
return getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders)
}
// HasOriginRequestHeaders returns a boolean if a field has been set.
func (o *HttpBackendCreate) HasOriginRequestHeaders() bool {
_, ok := o.GetOriginRequestHeadersOk()
return ok
}
// SetOriginRequestHeaders gets a reference to the given map[string]string and assigns it to the OriginRequestHeaders field.
func (o *HttpBackendCreate) SetOriginRequestHeaders(v HttpBackendCreateGetOriginRequestHeadersRetType) {
setHttpBackendCreateGetOriginRequestHeadersAttributeType(&o.OriginRequestHeaders, v)
}
// GetOriginUrl returns the OriginUrl field value
func (o *HttpBackendCreate) GetOriginUrl() (ret HttpBackendCreateGetOriginUrlRetType) {
ret, _ = o.GetOriginUrlOk()
return ret
}
// GetOriginUrlOk returns a tuple with the OriginUrl field value
// and a boolean to check if the value has been set.
func (o *HttpBackendCreate) GetOriginUrlOk() (ret HttpBackendCreateGetOriginUrlRetType, ok bool) {
return getHttpBackendCreateGetOriginUrlAttributeTypeOk(o.OriginUrl)
}
// SetOriginUrl sets field value
func (o *HttpBackendCreate) SetOriginUrl(v HttpBackendCreateGetOriginUrlRetType) {
setHttpBackendCreateGetOriginUrlAttributeType(&o.OriginUrl, v)
}
// GetType returns the Type field value
func (o *HttpBackendCreate) GetType() (ret HttpBackendCreateGetTypeRetType) {
ret, _ = o.GetTypeOk()
return ret
}
// GetTypeOk returns a tuple with the Type field value
// and a boolean to check if the value has been set.
func (o *HttpBackendCreate) GetTypeOk() (ret HttpBackendCreateGetTypeRetType, ok bool) {
return getHttpBackendCreateGetTypeAttributeTypeOk(o.Type)
}
// SetType sets field value
func (o *HttpBackendCreate) SetType(v HttpBackendCreateGetTypeRetType) {
setHttpBackendCreateGetTypeAttributeType(&o.Type, v)
}
func (o HttpBackendCreate) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getHttpBackendCreateGetGeofencingAttributeTypeOk(o.Geofencing); ok {
toSerialize["Geofencing"] = val
}
if val, ok := getHttpBackendCreateGetOriginRequestHeadersAttributeTypeOk(o.OriginRequestHeaders); ok {
toSerialize["OriginRequestHeaders"] = val
}
if val, ok := getHttpBackendCreateGetOriginUrlAttributeTypeOk(o.OriginUrl); ok {
toSerialize["OriginUrl"] = val
}
if val, ok := getHttpBackendCreateGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableHttpBackendCreate struct {
value *HttpBackendCreate
isSet bool
}
func (v NullableHttpBackendCreate) Get() *HttpBackendCreate {
return v.value
}
func (v *NullableHttpBackendCreate) Set(val *HttpBackendCreate) {
v.value = val
v.isSet = true
}
func (v NullableHttpBackendCreate) IsSet() bool {
return v.isSet
}
func (v *NullableHttpBackendCreate) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableHttpBackendCreate(val *HttpBackendCreate) *NullableHttpBackendCreate {
return &NullableHttpBackendCreate{value: val, isSet: true}
}
func (v NullableHttpBackendCreate) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableHttpBackendCreate) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}