## 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>
257 lines
8.4 KiB
Go
257 lines
8.4 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 BucketBackendCreate type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BucketBackendCreate{}
|
|
|
|
/*
|
|
types and functions for bucketUrl
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BucketBackendCreateGetBucketUrlAttributeType = *string
|
|
|
|
func getBucketBackendCreateGetBucketUrlAttributeTypeOk(arg BucketBackendCreateGetBucketUrlAttributeType) (ret BucketBackendCreateGetBucketUrlRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBucketBackendCreateGetBucketUrlAttributeType(arg *BucketBackendCreateGetBucketUrlAttributeType, val BucketBackendCreateGetBucketUrlRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BucketBackendCreateGetBucketUrlArgType = string
|
|
type BucketBackendCreateGetBucketUrlRetType = string
|
|
|
|
/*
|
|
types and functions for credentials
|
|
*/
|
|
|
|
// isModel
|
|
type BucketBackendCreateGetCredentialsAttributeType = *BucketCredentials
|
|
type BucketBackendCreateGetCredentialsArgType = BucketCredentials
|
|
type BucketBackendCreateGetCredentialsRetType = BucketCredentials
|
|
|
|
func getBucketBackendCreateGetCredentialsAttributeTypeOk(arg BucketBackendCreateGetCredentialsAttributeType) (ret BucketBackendCreateGetCredentialsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBucketBackendCreateGetCredentialsAttributeType(arg *BucketBackendCreateGetCredentialsAttributeType, val BucketBackendCreateGetCredentialsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for region
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BucketBackendCreateGetRegionAttributeType = *string
|
|
|
|
func getBucketBackendCreateGetRegionAttributeTypeOk(arg BucketBackendCreateGetRegionAttributeType) (ret BucketBackendCreateGetRegionRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBucketBackendCreateGetRegionAttributeType(arg *BucketBackendCreateGetRegionAttributeType, val BucketBackendCreateGetRegionRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BucketBackendCreateGetRegionArgType = string
|
|
type BucketBackendCreateGetRegionRetType = string
|
|
|
|
/*
|
|
types and functions for type
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type BucketBackendCreateGetTypeAttributeType = *string
|
|
|
|
func getBucketBackendCreateGetTypeAttributeTypeOk(arg BucketBackendCreateGetTypeAttributeType) (ret BucketBackendCreateGetTypeRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setBucketBackendCreateGetTypeAttributeType(arg *BucketBackendCreateGetTypeAttributeType, val BucketBackendCreateGetTypeRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type BucketBackendCreateGetTypeArgType = string
|
|
type BucketBackendCreateGetTypeRetType = string
|
|
|
|
// BucketBackendCreate struct for BucketBackendCreate
|
|
type BucketBackendCreate struct {
|
|
// REQUIRED
|
|
BucketUrl BucketBackendCreateGetBucketUrlAttributeType `json:"bucketUrl" required:"true"`
|
|
// REQUIRED
|
|
Credentials BucketBackendCreateGetCredentialsAttributeType `json:"credentials" required:"true"`
|
|
// REQUIRED
|
|
Region BucketBackendCreateGetRegionAttributeType `json:"region" required:"true"`
|
|
// REQUIRED
|
|
Type BucketBackendCreateGetTypeAttributeType `json:"type" required:"true"`
|
|
}
|
|
|
|
type _BucketBackendCreate BucketBackendCreate
|
|
|
|
// NewBucketBackendCreate instantiates a new BucketBackendCreate 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 NewBucketBackendCreate(bucketUrl BucketBackendCreateGetBucketUrlArgType, credentials BucketBackendCreateGetCredentialsArgType, region BucketBackendCreateGetRegionArgType, types BucketBackendCreateGetTypeArgType) *BucketBackendCreate {
|
|
this := BucketBackendCreate{}
|
|
setBucketBackendCreateGetBucketUrlAttributeType(&this.BucketUrl, bucketUrl)
|
|
setBucketBackendCreateGetCredentialsAttributeType(&this.Credentials, credentials)
|
|
setBucketBackendCreateGetRegionAttributeType(&this.Region, region)
|
|
setBucketBackendCreateGetTypeAttributeType(&this.Type, types)
|
|
return &this
|
|
}
|
|
|
|
// NewBucketBackendCreateWithDefaults instantiates a new BucketBackendCreate 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 NewBucketBackendCreateWithDefaults() *BucketBackendCreate {
|
|
this := BucketBackendCreate{}
|
|
return &this
|
|
}
|
|
|
|
// GetBucketUrl returns the BucketUrl field value
|
|
func (o *BucketBackendCreate) GetBucketUrl() (ret BucketBackendCreateGetBucketUrlRetType) {
|
|
ret, _ = o.GetBucketUrlOk()
|
|
return ret
|
|
}
|
|
|
|
// GetBucketUrlOk returns a tuple with the BucketUrl field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BucketBackendCreate) GetBucketUrlOk() (ret BucketBackendCreateGetBucketUrlRetType, ok bool) {
|
|
return getBucketBackendCreateGetBucketUrlAttributeTypeOk(o.BucketUrl)
|
|
}
|
|
|
|
// SetBucketUrl sets field value
|
|
func (o *BucketBackendCreate) SetBucketUrl(v BucketBackendCreateGetBucketUrlRetType) {
|
|
setBucketBackendCreateGetBucketUrlAttributeType(&o.BucketUrl, v)
|
|
}
|
|
|
|
// GetCredentials returns the Credentials field value
|
|
func (o *BucketBackendCreate) GetCredentials() (ret BucketBackendCreateGetCredentialsRetType) {
|
|
ret, _ = o.GetCredentialsOk()
|
|
return ret
|
|
}
|
|
|
|
// GetCredentialsOk returns a tuple with the Credentials field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BucketBackendCreate) GetCredentialsOk() (ret BucketBackendCreateGetCredentialsRetType, ok bool) {
|
|
return getBucketBackendCreateGetCredentialsAttributeTypeOk(o.Credentials)
|
|
}
|
|
|
|
// SetCredentials sets field value
|
|
func (o *BucketBackendCreate) SetCredentials(v BucketBackendCreateGetCredentialsRetType) {
|
|
setBucketBackendCreateGetCredentialsAttributeType(&o.Credentials, v)
|
|
}
|
|
|
|
// GetRegion returns the Region field value
|
|
func (o *BucketBackendCreate) GetRegion() (ret BucketBackendCreateGetRegionRetType) {
|
|
ret, _ = o.GetRegionOk()
|
|
return ret
|
|
}
|
|
|
|
// GetRegionOk returns a tuple with the Region field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BucketBackendCreate) GetRegionOk() (ret BucketBackendCreateGetRegionRetType, ok bool) {
|
|
return getBucketBackendCreateGetRegionAttributeTypeOk(o.Region)
|
|
}
|
|
|
|
// SetRegion sets field value
|
|
func (o *BucketBackendCreate) SetRegion(v BucketBackendCreateGetRegionRetType) {
|
|
setBucketBackendCreateGetRegionAttributeType(&o.Region, v)
|
|
}
|
|
|
|
// GetType returns the Type field value
|
|
func (o *BucketBackendCreate) GetType() (ret BucketBackendCreateGetTypeRetType) {
|
|
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 *BucketBackendCreate) GetTypeOk() (ret BucketBackendCreateGetTypeRetType, ok bool) {
|
|
return getBucketBackendCreateGetTypeAttributeTypeOk(o.Type)
|
|
}
|
|
|
|
// SetType sets field value
|
|
func (o *BucketBackendCreate) SetType(v BucketBackendCreateGetTypeRetType) {
|
|
setBucketBackendCreateGetTypeAttributeType(&o.Type, v)
|
|
}
|
|
|
|
func (o BucketBackendCreate) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getBucketBackendCreateGetBucketUrlAttributeTypeOk(o.BucketUrl); ok {
|
|
toSerialize["BucketUrl"] = val
|
|
}
|
|
if val, ok := getBucketBackendCreateGetCredentialsAttributeTypeOk(o.Credentials); ok {
|
|
toSerialize["Credentials"] = val
|
|
}
|
|
if val, ok := getBucketBackendCreateGetRegionAttributeTypeOk(o.Region); ok {
|
|
toSerialize["Region"] = val
|
|
}
|
|
if val, ok := getBucketBackendCreateGetTypeAttributeTypeOk(o.Type); ok {
|
|
toSerialize["Type"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableBucketBackendCreate struct {
|
|
value *BucketBackendCreate
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBucketBackendCreate) Get() *BucketBackendCreate {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBucketBackendCreate) Set(val *BucketBackendCreate) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBucketBackendCreate) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBucketBackendCreate) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBucketBackendCreate(val *BucketBackendCreate) *NullableBucketBackendCreate {
|
|
return &NullableBucketBackendCreate{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBucketBackendCreate) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBucketBackendCreate) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|