1 /*
2 Intelligent DNS API
3 4 No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 6 API version: 1.0.0
7 */
8 9 // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
10 11 package idns
12 13 import (
14 "encoding/json"
15 )
16 17 // checks if the ErrorResponse type satisfies the MappedNullable interface at compile time
18 var _ MappedNullable = &ErrorResponse{}
19 20 // ErrorResponse struct for ErrorResponse
21 type ErrorResponse struct {
22 Detail *string `json:"detail,omitempty"`
23 }
24 25 // NewErrorResponse instantiates a new ErrorResponse object
26 // This constructor will assign default values to properties that have it defined,
27 // and makes sure properties required by API are set, but the set of arguments
28 // will change when the set of required properties is changed
29 func NewErrorResponse() *ErrorResponse {
30 this := ErrorResponse{}
31 return &this
32 }
33 34 // NewErrorResponseWithDefaults instantiates a new ErrorResponse object
35 // This constructor will only assign default values to properties that have it defined,
36 // but it doesn't guarantee that properties required by API are set
37 func NewErrorResponseWithDefaults() *ErrorResponse {
38 this := ErrorResponse{}
39 return &this
40 }
41 42 // GetDetail returns the Detail field value if set, zero value otherwise.
43 func (o *ErrorResponse) GetDetail() string {
44 if o == nil || IsNil(o.Detail) {
45 var ret string
46 return ret
47 }
48 return *o.Detail
49 }
50 51 // GetDetailOk returns a tuple with the Detail field value if set, nil otherwise
52 // and a boolean to check if the value has been set.
53 func (o *ErrorResponse) GetDetailOk() (*string, bool) {
54 if o == nil || IsNil(o.Detail) {
55 return nil, false
56 }
57 return o.Detail, true
58 }
59 60 // HasDetail returns a boolean if a field has been set.
61 func (o *ErrorResponse) HasDetail() bool {
62 if o != nil && !IsNil(o.Detail) {
63 return true
64 }
65 66 return false
67 }
68 69 // SetDetail gets a reference to the given string and assigns it to the Detail field.
70 func (o *ErrorResponse) SetDetail(v string) {
71 o.Detail = &v
72 }
73 74 func (o ErrorResponse) MarshalJSON() ([]byte, error) {
75 toSerialize,err := o.ToMap()
76 if err != nil {
77 return []byte{}, err
78 }
79 return json.Marshal(toSerialize)
80 }
81 82 func (o ErrorResponse) ToMap() (map[string]interface{}, error) {
83 toSerialize := map[string]interface{}{}
84 if !IsNil(o.Detail) {
85 toSerialize["detail"] = o.Detail
86 }
87 return toSerialize, nil
88 }
89 90 type NullableErrorResponse struct {
91 value *ErrorResponse
92 isSet bool
93 }
94 95 func (v NullableErrorResponse) Get() *ErrorResponse {
96 return v.value
97 }
98 99 func (v *NullableErrorResponse) Set(val *ErrorResponse) {
100 v.value = val
101 v.isSet = true
102 }
103 104 func (v NullableErrorResponse) IsSet() bool {
105 return v.isSet
106 }
107 108 func (v *NullableErrorResponse) Unset() {
109 v.value = nil
110 v.isSet = false
111 }
112 113 func NewNullableErrorResponse(val *ErrorResponse) *NullableErrorResponse {
114 return &NullableErrorResponse{value: val, isSet: true}
115 }
116 117 func (v NullableErrorResponse) MarshalJSON() ([]byte, error) {
118 return json.Marshal(v.value)
119 }
120 121 func (v *NullableErrorResponse) UnmarshalJSON(src []byte) error {
122 v.isSet = true
123 return json.Unmarshal(src, &v.value)
124 }
125 126 127