terraform-provider-stackitp.../pkg/cdnbeta/model_bucket_backend_patch.go
2026-01-21 09:07:29 +01:00

269 lines
8.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 BucketBackendPatch type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BucketBackendPatch{}
/*
types and functions for bucketUrl
*/
// isNotNullableString
type BucketBackendPatchGetBucketUrlAttributeType = *string
func getBucketBackendPatchGetBucketUrlAttributeTypeOk(arg BucketBackendPatchGetBucketUrlAttributeType) (ret BucketBackendPatchGetBucketUrlRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBucketBackendPatchGetBucketUrlAttributeType(arg *BucketBackendPatchGetBucketUrlAttributeType, val BucketBackendPatchGetBucketUrlRetType) {
*arg = &val
}
type BucketBackendPatchGetBucketUrlArgType = string
type BucketBackendPatchGetBucketUrlRetType = string
/*
types and functions for credentials
*/
// isModel
type BucketBackendPatchGetCredentialsAttributeType = *BucketCredentials
type BucketBackendPatchGetCredentialsArgType = BucketCredentials
type BucketBackendPatchGetCredentialsRetType = BucketCredentials
func getBucketBackendPatchGetCredentialsAttributeTypeOk(arg BucketBackendPatchGetCredentialsAttributeType) (ret BucketBackendPatchGetCredentialsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBucketBackendPatchGetCredentialsAttributeType(arg *BucketBackendPatchGetCredentialsAttributeType, val BucketBackendPatchGetCredentialsRetType) {
*arg = &val
}
/*
types and functions for region
*/
// isNotNullableString
type BucketBackendPatchGetRegionAttributeType = *string
func getBucketBackendPatchGetRegionAttributeTypeOk(arg BucketBackendPatchGetRegionAttributeType) (ret BucketBackendPatchGetRegionRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBucketBackendPatchGetRegionAttributeType(arg *BucketBackendPatchGetRegionAttributeType, val BucketBackendPatchGetRegionRetType) {
*arg = &val
}
type BucketBackendPatchGetRegionArgType = string
type BucketBackendPatchGetRegionRetType = string
/*
types and functions for type
*/
// isNotNullableString
type BucketBackendPatchGetTypeAttributeType = *string
func getBucketBackendPatchGetTypeAttributeTypeOk(arg BucketBackendPatchGetTypeAttributeType) (ret BucketBackendPatchGetTypeRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setBucketBackendPatchGetTypeAttributeType(arg *BucketBackendPatchGetTypeAttributeType, val BucketBackendPatchGetTypeRetType) {
*arg = &val
}
type BucketBackendPatchGetTypeArgType = string
type BucketBackendPatchGetTypeRetType = string
// BucketBackendPatch struct for BucketBackendPatch
type BucketBackendPatch struct {
BucketUrl BucketBackendPatchGetBucketUrlAttributeType `json:"bucketUrl,omitempty"`
Credentials BucketBackendPatchGetCredentialsAttributeType `json:"credentials,omitempty"`
Region BucketBackendPatchGetRegionAttributeType `json:"region,omitempty"`
// REQUIRED
Type BucketBackendPatchGetTypeAttributeType `json:"type" required:"true"`
}
type _BucketBackendPatch BucketBackendPatch
// NewBucketBackendPatch instantiates a new BucketBackendPatch 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 NewBucketBackendPatch(types BucketBackendPatchGetTypeArgType) *BucketBackendPatch {
this := BucketBackendPatch{}
setBucketBackendPatchGetTypeAttributeType(&this.Type, types)
return &this
}
// NewBucketBackendPatchWithDefaults instantiates a new BucketBackendPatch 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 NewBucketBackendPatchWithDefaults() *BucketBackendPatch {
this := BucketBackendPatch{}
return &this
}
// GetBucketUrl returns the BucketUrl field value if set, zero value otherwise.
func (o *BucketBackendPatch) GetBucketUrl() (res BucketBackendPatchGetBucketUrlRetType) {
res, _ = o.GetBucketUrlOk()
return
}
// GetBucketUrlOk returns a tuple with the BucketUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BucketBackendPatch) GetBucketUrlOk() (ret BucketBackendPatchGetBucketUrlRetType, ok bool) {
return getBucketBackendPatchGetBucketUrlAttributeTypeOk(o.BucketUrl)
}
// HasBucketUrl returns a boolean if a field has been set.
func (o *BucketBackendPatch) HasBucketUrl() bool {
_, ok := o.GetBucketUrlOk()
return ok
}
// SetBucketUrl gets a reference to the given string and assigns it to the BucketUrl field.
func (o *BucketBackendPatch) SetBucketUrl(v BucketBackendPatchGetBucketUrlRetType) {
setBucketBackendPatchGetBucketUrlAttributeType(&o.BucketUrl, v)
}
// GetCredentials returns the Credentials field value if set, zero value otherwise.
func (o *BucketBackendPatch) GetCredentials() (res BucketBackendPatchGetCredentialsRetType) {
res, _ = o.GetCredentialsOk()
return
}
// GetCredentialsOk returns a tuple with the Credentials field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BucketBackendPatch) GetCredentialsOk() (ret BucketBackendPatchGetCredentialsRetType, ok bool) {
return getBucketBackendPatchGetCredentialsAttributeTypeOk(o.Credentials)
}
// HasCredentials returns a boolean if a field has been set.
func (o *BucketBackendPatch) HasCredentials() bool {
_, ok := o.GetCredentialsOk()
return ok
}
// SetCredentials gets a reference to the given BucketCredentials and assigns it to the Credentials field.
func (o *BucketBackendPatch) SetCredentials(v BucketBackendPatchGetCredentialsRetType) {
setBucketBackendPatchGetCredentialsAttributeType(&o.Credentials, v)
}
// GetRegion returns the Region field value if set, zero value otherwise.
func (o *BucketBackendPatch) GetRegion() (res BucketBackendPatchGetRegionRetType) {
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 *BucketBackendPatch) GetRegionOk() (ret BucketBackendPatchGetRegionRetType, ok bool) {
return getBucketBackendPatchGetRegionAttributeTypeOk(o.Region)
}
// HasRegion returns a boolean if a field has been set.
func (o *BucketBackendPatch) HasRegion() bool {
_, ok := o.GetRegionOk()
return ok
}
// SetRegion gets a reference to the given string and assigns it to the Region field.
func (o *BucketBackendPatch) SetRegion(v BucketBackendPatchGetRegionRetType) {
setBucketBackendPatchGetRegionAttributeType(&o.Region, v)
}
// GetType returns the Type field value
func (o *BucketBackendPatch) GetType() (ret BucketBackendPatchGetTypeRetType) {
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 *BucketBackendPatch) GetTypeOk() (ret BucketBackendPatchGetTypeRetType, ok bool) {
return getBucketBackendPatchGetTypeAttributeTypeOk(o.Type)
}
// SetType sets field value
func (o *BucketBackendPatch) SetType(v BucketBackendPatchGetTypeRetType) {
setBucketBackendPatchGetTypeAttributeType(&o.Type, v)
}
func (o BucketBackendPatch) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getBucketBackendPatchGetBucketUrlAttributeTypeOk(o.BucketUrl); ok {
toSerialize["BucketUrl"] = val
}
if val, ok := getBucketBackendPatchGetCredentialsAttributeTypeOk(o.Credentials); ok {
toSerialize["Credentials"] = val
}
if val, ok := getBucketBackendPatchGetRegionAttributeTypeOk(o.Region); ok {
toSerialize["Region"] = val
}
if val, ok := getBucketBackendPatchGetTypeAttributeTypeOk(o.Type); ok {
toSerialize["Type"] = val
}
return toSerialize, nil
}
type NullableBucketBackendPatch struct {
value *BucketBackendPatch
isSet bool
}
func (v NullableBucketBackendPatch) Get() *BucketBackendPatch {
return v.value
}
func (v *NullableBucketBackendPatch) Set(val *BucketBackendPatch) {
v.value = val
v.isSet = true
}
func (v NullableBucketBackendPatch) IsSet() bool {
return v.isSet
}
func (v *NullableBucketBackendPatch) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBucketBackendPatch(val *BucketBackendPatch) *NullableBucketBackendPatch {
return &NullableBucketBackendPatch{value: val, isSet: true}
}
func (v NullableBucketBackendPatch) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBucketBackendPatch) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}