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 GetZonesResponse type satisfies the MappedNullable interface at compile time
18 var _ MappedNullable = &GetZonesResponse{}
19 20 // GetZonesResponse Object returned by get zones
21 type GetZonesResponse struct {
22 // The schema version
23 SchemaVersion *int32 `json:"schema_version,omitempty"`
24 // Number of records
25 Count *int32 `json:"count,omitempty"`
26 // The total pages
27 TotalPages *int32 `json:"total_pages,omitempty"`
28 Links *GetZonesResponseLinks `json:"links,omitempty"`
29 // Hosted zones collection
30 Results []Zone `json:"results,omitempty"`
31 }
32 33 // NewGetZonesResponse instantiates a new GetZonesResponse object
34 // This constructor will assign default values to properties that have it defined,
35 // and makes sure properties required by API are set, but the set of arguments
36 // will change when the set of required properties is changed
37 func NewGetZonesResponse() *GetZonesResponse {
38 this := GetZonesResponse{}
39 return &this
40 }
41 42 // NewGetZonesResponseWithDefaults instantiates a new GetZonesResponse object
43 // This constructor will only assign default values to properties that have it defined,
44 // but it doesn't guarantee that properties required by API are set
45 func NewGetZonesResponseWithDefaults() *GetZonesResponse {
46 this := GetZonesResponse{}
47 return &this
48 }
49 50 // GetSchemaVersion returns the SchemaVersion field value if set, zero value otherwise.
51 func (o *GetZonesResponse) GetSchemaVersion() int32 {
52 if o == nil || IsNil(o.SchemaVersion) {
53 var ret int32
54 return ret
55 }
56 return *o.SchemaVersion
57 }
58 59 // GetSchemaVersionOk returns a tuple with the SchemaVersion field value if set, nil otherwise
60 // and a boolean to check if the value has been set.
61 func (o *GetZonesResponse) GetSchemaVersionOk() (*int32, bool) {
62 if o == nil || IsNil(o.SchemaVersion) {
63 return nil, false
64 }
65 return o.SchemaVersion, true
66 }
67 68 // HasSchemaVersion returns a boolean if a field has been set.
69 func (o *GetZonesResponse) HasSchemaVersion() bool {
70 if o != nil && !IsNil(o.SchemaVersion) {
71 return true
72 }
73 74 return false
75 }
76 77 // SetSchemaVersion gets a reference to the given int32 and assigns it to the SchemaVersion field.
78 func (o *GetZonesResponse) SetSchemaVersion(v int32) {
79 o.SchemaVersion = &v
80 }
81 82 // GetCount returns the Count field value if set, zero value otherwise.
83 func (o *GetZonesResponse) GetCount() int32 {
84 if o == nil || IsNil(o.Count) {
85 var ret int32
86 return ret
87 }
88 return *o.Count
89 }
90 91 // GetCountOk returns a tuple with the Count field value if set, nil otherwise
92 // and a boolean to check if the value has been set.
93 func (o *GetZonesResponse) GetCountOk() (*int32, bool) {
94 if o == nil || IsNil(o.Count) {
95 return nil, false
96 }
97 return o.Count, true
98 }
99 100 // HasCount returns a boolean if a field has been set.
101 func (o *GetZonesResponse) HasCount() bool {
102 if o != nil && !IsNil(o.Count) {
103 return true
104 }
105 106 return false
107 }
108 109 // SetCount gets a reference to the given int32 and assigns it to the Count field.
110 func (o *GetZonesResponse) SetCount(v int32) {
111 o.Count = &v
112 }
113 114 // GetTotalPages returns the TotalPages field value if set, zero value otherwise.
115 func (o *GetZonesResponse) GetTotalPages() int32 {
116 if o == nil || IsNil(o.TotalPages) {
117 var ret int32
118 return ret
119 }
120 return *o.TotalPages
121 }
122 123 // GetTotalPagesOk returns a tuple with the TotalPages field value if set, nil otherwise
124 // and a boolean to check if the value has been set.
125 func (o *GetZonesResponse) GetTotalPagesOk() (*int32, bool) {
126 if o == nil || IsNil(o.TotalPages) {
127 return nil, false
128 }
129 return o.TotalPages, true
130 }
131 132 // HasTotalPages returns a boolean if a field has been set.
133 func (o *GetZonesResponse) HasTotalPages() bool {
134 if o != nil && !IsNil(o.TotalPages) {
135 return true
136 }
137 138 return false
139 }
140 141 // SetTotalPages gets a reference to the given int32 and assigns it to the TotalPages field.
142 func (o *GetZonesResponse) SetTotalPages(v int32) {
143 o.TotalPages = &v
144 }
145 146 // GetLinks returns the Links field value if set, zero value otherwise.
147 func (o *GetZonesResponse) GetLinks() GetZonesResponseLinks {
148 if o == nil || IsNil(o.Links) {
149 var ret GetZonesResponseLinks
150 return ret
151 }
152 return *o.Links
153 }
154 155 // GetLinksOk returns a tuple with the Links field value if set, nil otherwise
156 // and a boolean to check if the value has been set.
157 func (o *GetZonesResponse) GetLinksOk() (*GetZonesResponseLinks, bool) {
158 if o == nil || IsNil(o.Links) {
159 return nil, false
160 }
161 return o.Links, true
162 }
163 164 // HasLinks returns a boolean if a field has been set.
165 func (o *GetZonesResponse) HasLinks() bool {
166 if o != nil && !IsNil(o.Links) {
167 return true
168 }
169 170 return false
171 }
172 173 // SetLinks gets a reference to the given GetZonesResponseLinks and assigns it to the Links field.
174 func (o *GetZonesResponse) SetLinks(v GetZonesResponseLinks) {
175 o.Links = &v
176 }
177 178 // GetResults returns the Results field value if set, zero value otherwise.
179 func (o *GetZonesResponse) GetResults() []Zone {
180 if o == nil || IsNil(o.Results) {
181 var ret []Zone
182 return ret
183 }
184 return o.Results
185 }
186 187 // GetResultsOk returns a tuple with the Results field value if set, nil otherwise
188 // and a boolean to check if the value has been set.
189 func (o *GetZonesResponse) GetResultsOk() ([]Zone, bool) {
190 if o == nil || IsNil(o.Results) {
191 return nil, false
192 }
193 return o.Results, true
194 }
195 196 // HasResults returns a boolean if a field has been set.
197 func (o *GetZonesResponse) HasResults() bool {
198 if o != nil && !IsNil(o.Results) {
199 return true
200 }
201 202 return false
203 }
204 205 // SetResults gets a reference to the given []Zone and assigns it to the Results field.
206 func (o *GetZonesResponse) SetResults(v []Zone) {
207 o.Results = v
208 }
209 210 func (o GetZonesResponse) MarshalJSON() ([]byte, error) {
211 toSerialize,err := o.ToMap()
212 if err != nil {
213 return []byte{}, err
214 }
215 return json.Marshal(toSerialize)
216 }
217 218 func (o GetZonesResponse) ToMap() (map[string]interface{}, error) {
219 toSerialize := map[string]interface{}{}
220 if !IsNil(o.SchemaVersion) {
221 toSerialize["schema_version"] = o.SchemaVersion
222 }
223 if !IsNil(o.Count) {
224 toSerialize["count"] = o.Count
225 }
226 if !IsNil(o.TotalPages) {
227 toSerialize["total_pages"] = o.TotalPages
228 }
229 if !IsNil(o.Links) {
230 toSerialize["links"] = o.Links
231 }
232 if !IsNil(o.Results) {
233 toSerialize["results"] = o.Results
234 }
235 return toSerialize, nil
236 }
237 238 type NullableGetZonesResponse struct {
239 value *GetZonesResponse
240 isSet bool
241 }
242 243 func (v NullableGetZonesResponse) Get() *GetZonesResponse {
244 return v.value
245 }
246 247 func (v *NullableGetZonesResponse) Set(val *GetZonesResponse) {
248 v.value = val
249 v.isSet = true
250 }
251 252 func (v NullableGetZonesResponse) IsSet() bool {
253 return v.isSet
254 }
255 256 func (v *NullableGetZonesResponse) Unset() {
257 v.value = nil
258 v.isSet = false
259 }
260 261 func NewNullableGetZonesResponse(val *GetZonesResponse) *NullableGetZonesResponse {
262 return &NullableGetZonesResponse{value: val, isSet: true}
263 }
264 265 func (v NullableGetZonesResponse) MarshalJSON() ([]byte, error) {
266 return json.Marshal(v.value)
267 }
268 269 func (v *NullableGetZonesResponse) UnmarshalJSON(src []byte) error {
270 v.isSet = true
271 return json.Unmarshal(src, &v.value)
272 }
273 274 275