## 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>
174 lines
5.4 KiB
Go
174 lines
5.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 GenericJsonResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GenericJsonResponse{}
|
|
|
|
/*
|
|
types and functions for details
|
|
*/
|
|
|
|
// isArray
|
|
type GenericJsonResponseGetDetailsAttributeType = *[]ErrorDetails
|
|
type GenericJsonResponseGetDetailsArgType = []ErrorDetails
|
|
type GenericJsonResponseGetDetailsRetType = []ErrorDetails
|
|
|
|
func getGenericJsonResponseGetDetailsAttributeTypeOk(arg GenericJsonResponseGetDetailsAttributeType) (ret GenericJsonResponseGetDetailsRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGenericJsonResponseGetDetailsAttributeType(arg *GenericJsonResponseGetDetailsAttributeType, val GenericJsonResponseGetDetailsRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
/*
|
|
types and functions for message
|
|
*/
|
|
|
|
// isNotNullableString
|
|
type GenericJsonResponseGetMessageAttributeType = *string
|
|
|
|
func getGenericJsonResponseGetMessageAttributeTypeOk(arg GenericJsonResponseGetMessageAttributeType) (ret GenericJsonResponseGetMessageRetType, ok bool) {
|
|
if arg == nil {
|
|
return ret, false
|
|
}
|
|
return *arg, true
|
|
}
|
|
|
|
func setGenericJsonResponseGetMessageAttributeType(arg *GenericJsonResponseGetMessageAttributeType, val GenericJsonResponseGetMessageRetType) {
|
|
*arg = &val
|
|
}
|
|
|
|
type GenericJsonResponseGetMessageArgType = string
|
|
type GenericJsonResponseGetMessageRetType = string
|
|
|
|
// GenericJsonResponse struct for GenericJsonResponse
|
|
type GenericJsonResponse struct {
|
|
// Listing of issues with your request
|
|
Details GenericJsonResponseGetDetailsAttributeType `json:"details,omitempty"`
|
|
// REQUIRED
|
|
Message GenericJsonResponseGetMessageAttributeType `json:"message" required:"true"`
|
|
}
|
|
|
|
type _GenericJsonResponse GenericJsonResponse
|
|
|
|
// NewGenericJsonResponse instantiates a new GenericJsonResponse 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 NewGenericJsonResponse(message GenericJsonResponseGetMessageArgType) *GenericJsonResponse {
|
|
this := GenericJsonResponse{}
|
|
setGenericJsonResponseGetMessageAttributeType(&this.Message, message)
|
|
return &this
|
|
}
|
|
|
|
// NewGenericJsonResponseWithDefaults instantiates a new GenericJsonResponse 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 NewGenericJsonResponseWithDefaults() *GenericJsonResponse {
|
|
this := GenericJsonResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetDetails returns the Details field value if set, zero value otherwise.
|
|
func (o *GenericJsonResponse) GetDetails() (res GenericJsonResponseGetDetailsRetType) {
|
|
res, _ = o.GetDetailsOk()
|
|
return
|
|
}
|
|
|
|
// GetDetailsOk returns a tuple with the Details field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GenericJsonResponse) GetDetailsOk() (ret GenericJsonResponseGetDetailsRetType, ok bool) {
|
|
return getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details)
|
|
}
|
|
|
|
// HasDetails returns a boolean if a field has been set.
|
|
func (o *GenericJsonResponse) HasDetails() bool {
|
|
_, ok := o.GetDetailsOk()
|
|
return ok
|
|
}
|
|
|
|
// SetDetails gets a reference to the given []ErrorDetails and assigns it to the Details field.
|
|
func (o *GenericJsonResponse) SetDetails(v GenericJsonResponseGetDetailsRetType) {
|
|
setGenericJsonResponseGetDetailsAttributeType(&o.Details, v)
|
|
}
|
|
|
|
// GetMessage returns the Message field value
|
|
func (o *GenericJsonResponse) GetMessage() (ret GenericJsonResponseGetMessageRetType) {
|
|
ret, _ = o.GetMessageOk()
|
|
return ret
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GenericJsonResponse) GetMessageOk() (ret GenericJsonResponseGetMessageRetType, ok bool) {
|
|
return getGenericJsonResponseGetMessageAttributeTypeOk(o.Message)
|
|
}
|
|
|
|
// SetMessage sets field value
|
|
func (o *GenericJsonResponse) SetMessage(v GenericJsonResponseGetMessageRetType) {
|
|
setGenericJsonResponseGetMessageAttributeType(&o.Message, v)
|
|
}
|
|
|
|
func (o GenericJsonResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if val, ok := getGenericJsonResponseGetDetailsAttributeTypeOk(o.Details); ok {
|
|
toSerialize["Details"] = val
|
|
}
|
|
if val, ok := getGenericJsonResponseGetMessageAttributeTypeOk(o.Message); ok {
|
|
toSerialize["Message"] = val
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableGenericJsonResponse struct {
|
|
value *GenericJsonResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGenericJsonResponse) Get() *GenericJsonResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGenericJsonResponse) Set(val *GenericJsonResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGenericJsonResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGenericJsonResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGenericJsonResponse(val *GenericJsonResponse) *NullableGenericJsonResponse {
|
|
return &NullableGenericJsonResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGenericJsonResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGenericJsonResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|