## 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>
176 lines
6.1 KiB
Go
176 lines
6.1 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 PutCustomDomainPayload type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PutCustomDomainPayload{}
|
|
|
|
/*
|
|
types and functions for certificate
|
|
*/
|
|
|
|
// isModel
|
|
type PutCustomDomainPayloadGetCertificateAttributeType = *PutCustomDomainPayloadCertificate
|
|
type PutCustomDomainPayloadGetCertificateArgType = PutCustomDomainPayloadCertificate
|
|
type PutCustomDomainPayloadGetCertificateRetType = PutCustomDomainPayloadCertificate
|
|
|
|
func getPutCustomDomainPayloadGetCertificateAttributeTypeOk(arg PutCustomDomainPayloadGetCertificateAttributeType) (ret PutCustomDomainPayloadGetCertificateRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPutCustomDomainPayloadGetCertificateAttributeType(arg *PutCustomDomainPayloadGetCertificateAttributeType, val PutCustomDomainPayloadGetCertificateRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for intentId
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type PutCustomDomainPayloadGetIntentIdAttributeType = *string
|
|
|
|
func getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(arg PutCustomDomainPayloadGetIntentIdAttributeType) (ret PutCustomDomainPayloadGetIntentIdRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setPutCustomDomainPayloadGetIntentIdAttributeType(arg *PutCustomDomainPayloadGetIntentIdAttributeType, val PutCustomDomainPayloadGetIntentIdRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type PutCustomDomainPayloadGetIntentIdArgType = string
|
|
type PutCustomDomainPayloadGetIntentIdRetType = string
|
|
|
|
// PutCustomDomainPayload struct for PutCustomDomainPayload
|
|
type PutCustomDomainPayload struct {
|
|
Certificate PutCustomDomainPayloadGetCertificateAttributeType `json:"certificate,omitempty"`
|
|
// While optional, it is greatly encouraged to provide an `intentId`. This is used to deduplicate requests. If multiple modifying Requests with the same `intentId` for a given `projectId` are received, all but the first request are dropped.
|
|
IntentId PutCustomDomainPayloadGetIntentIdAttributeType `json:"intentId,omitempty"`
|
|
}
|
|
|
|
// NewPutCustomDomainPayload instantiates a new PutCustomDomainPayload 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 NewPutCustomDomainPayload() *PutCustomDomainPayload {
|
|
this := PutCustomDomainPayload{}
|
|
return &this
|
|
}
|
|
|
|
// NewPutCustomDomainPayloadWithDefaults instantiates a new PutCustomDomainPayload 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 NewPutCustomDomainPayloadWithDefaults() *PutCustomDomainPayload {
|
|
this := PutCustomDomainPayload{}
|
|
return &this
|
|
}
|
|
|
|
// GetCertificate returns the Certificate field value if set, zero value otherwise.
|
|
func (o *PutCustomDomainPayload) GetCertificate() (res PutCustomDomainPayloadGetCertificateRetType) {
|
|
res, _ = o.GetCertificateOk()
|
|
return
|
|
}
|
|
|
|
// GetCertificateOk returns a tuple with the Certificate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PutCustomDomainPayload) GetCertificateOk() (ret PutCustomDomainPayloadGetCertificateRetType, ok bool) {
|
|
return getPutCustomDomainPayloadGetCertificateAttributeTypeOk(o.Certificate)
|
|
}
|
|
|
|
// HasCertificate returns a boolean if a field has been set.
|
|
func (o *PutCustomDomainPayload) HasCertificate() bool {
|
|
_, ok := o.GetCertificateOk()
|
|
return ok
|
|
}
|
|
|
|
// SetCertificate gets a reference to the given PutCustomDomainPayloadCertificate and assigns it to the Certificate field.
|
|
func (o *PutCustomDomainPayload) SetCertificate(v PutCustomDomainPayloadGetCertificateRetType) {
|
|
setPutCustomDomainPayloadGetCertificateAttributeType(&o.Certificate, v)
|
|
}
|
|
|
|
// GetIntentId returns the IntentId field value if set, zero value otherwise.
|
|
func (o *PutCustomDomainPayload) GetIntentId() (res PutCustomDomainPayloadGetIntentIdRetType) {
|
|
res, _ = o.GetIntentIdOk()
|
|
return
|
|
}
|
|
|
|
// GetIntentIdOk returns a tuple with the IntentId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PutCustomDomainPayload) GetIntentIdOk() (ret PutCustomDomainPayloadGetIntentIdRetType, ok bool) {
|
|
return getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(o.IntentId)
|
|
}
|
|
|
|
// HasIntentId returns a boolean if a field has been set.
|
|
func (o *PutCustomDomainPayload) HasIntentId() bool {
|
|
_, ok := o.GetIntentIdOk()
|
|
return ok
|
|
}
|
|
|
|
// SetIntentId gets a reference to the given string and assigns it to the IntentId field.
|
|
func (o *PutCustomDomainPayload) SetIntentId(v PutCustomDomainPayloadGetIntentIdRetType) {
|
|
setPutCustomDomainPayloadGetIntentIdAttributeType(&o.IntentId, v)
|
|
}
|
|
|
|
func (o PutCustomDomainPayload) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getPutCustomDomainPayloadGetCertificateAttributeTypeOk(o.Certificate); ok {
|
|
toSerialize["Certificate"] = val
|
|
}
|
|
if val, ok := getPutCustomDomainPayloadGetIntentIdAttributeTypeOk(o.IntentId); ok {
|
|
toSerialize["IntentId"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullablePutCustomDomainPayload struct {
|
|
value *PutCustomDomainPayload
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePutCustomDomainPayload) Get() *PutCustomDomainPayload {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePutCustomDomainPayload) Set(val *PutCustomDomainPayload) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePutCustomDomainPayload) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePutCustomDomainPayload) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePutCustomDomainPayload(val *PutCustomDomainPayload) *NullablePutCustomDomainPayload {
|
|
return &NullablePutCustomDomainPayload{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePutCustomDomainPayload) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePutCustomDomainPayload) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|