/* 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) }