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 GetZonesResponseLinks type satisfies the MappedNullable interface at compile time
18 var _ MappedNullable = &GetZonesResponseLinks{}
19 20 // GetZonesResponseLinks struct for GetZonesResponseLinks
21 type GetZonesResponseLinks struct {
22 Previous NullableString `json:"previous,omitempty"`
23 Next NullableString `json:"next,omitempty"`
24 }
25 26 // NewGetZonesResponseLinks instantiates a new GetZonesResponseLinks object
27 // This constructor will assign default values to properties that have it defined,
28 // and makes sure properties required by API are set, but the set of arguments
29 // will change when the set of required properties is changed
30 func NewGetZonesResponseLinks() *GetZonesResponseLinks {
31 this := GetZonesResponseLinks{}
32 return &this
33 }
34 35 // NewGetZonesResponseLinksWithDefaults instantiates a new GetZonesResponseLinks object
36 // This constructor will only assign default values to properties that have it defined,
37 // but it doesn't guarantee that properties required by API are set
38 func NewGetZonesResponseLinksWithDefaults() *GetZonesResponseLinks {
39 this := GetZonesResponseLinks{}
40 return &this
41 }
42 43 // GetPrevious returns the Previous field value if set, zero value otherwise (both if not set or set to explicit null).
44 func (o *GetZonesResponseLinks) GetPrevious() string {
45 if o == nil || IsNil(o.Previous.Get()) {
46 var ret string
47 return ret
48 }
49 return *o.Previous.Get()
50 }
51 52 // GetPreviousOk returns a tuple with the Previous field value if set, nil otherwise
53 // and a boolean to check if the value has been set.
54 // NOTE: If the value is an explicit nil, `nil, true` will be returned
55 func (o *GetZonesResponseLinks) GetPreviousOk() (*string, bool) {
56 if o == nil {
57 return nil, false
58 }
59 return o.Previous.Get(), o.Previous.IsSet()
60 }
61 62 // HasPrevious returns a boolean if a field has been set.
63 func (o *GetZonesResponseLinks) HasPrevious() bool {
64 if o != nil && o.Previous.IsSet() {
65 return true
66 }
67 68 return false
69 }
70 71 // SetPrevious gets a reference to the given NullableString and assigns it to the Previous field.
72 func (o *GetZonesResponseLinks) SetPrevious(v string) {
73 o.Previous.Set(&v)
74 }
75 // SetPreviousNil sets the value for Previous to be an explicit nil
76 func (o *GetZonesResponseLinks) SetPreviousNil() {
77 o.Previous.Set(nil)
78 }
79 80 // UnsetPrevious ensures that no value is present for Previous, not even an explicit nil
81 func (o *GetZonesResponseLinks) UnsetPrevious() {
82 o.Previous.Unset()
83 }
84 85 // GetNext returns the Next field value if set, zero value otherwise (both if not set or set to explicit null).
86 func (o *GetZonesResponseLinks) GetNext() string {
87 if o == nil || IsNil(o.Next.Get()) {
88 var ret string
89 return ret
90 }
91 return *o.Next.Get()
92 }
93 94 // GetNextOk returns a tuple with the Next field value if set, nil otherwise
95 // and a boolean to check if the value has been set.
96 // NOTE: If the value is an explicit nil, `nil, true` will be returned
97 func (o *GetZonesResponseLinks) GetNextOk() (*string, bool) {
98 if o == nil {
99 return nil, false
100 }
101 return o.Next.Get(), o.Next.IsSet()
102 }
103 104 // HasNext returns a boolean if a field has been set.
105 func (o *GetZonesResponseLinks) HasNext() bool {
106 if o != nil && o.Next.IsSet() {
107 return true
108 }
109 110 return false
111 }
112 113 // SetNext gets a reference to the given NullableString and assigns it to the Next field.
114 func (o *GetZonesResponseLinks) SetNext(v string) {
115 o.Next.Set(&v)
116 }
117 // SetNextNil sets the value for Next to be an explicit nil
118 func (o *GetZonesResponseLinks) SetNextNil() {
119 o.Next.Set(nil)
120 }
121 122 // UnsetNext ensures that no value is present for Next, not even an explicit nil
123 func (o *GetZonesResponseLinks) UnsetNext() {
124 o.Next.Unset()
125 }
126 127 func (o GetZonesResponseLinks) MarshalJSON() ([]byte, error) {
128 toSerialize,err := o.ToMap()
129 if err != nil {
130 return []byte{}, err
131 }
132 return json.Marshal(toSerialize)
133 }
134 135 func (o GetZonesResponseLinks) ToMap() (map[string]interface{}, error) {
136 toSerialize := map[string]interface{}{}
137 if o.Previous.IsSet() {
138 toSerialize["previous"] = o.Previous.Get()
139 }
140 if o.Next.IsSet() {
141 toSerialize["next"] = o.Next.Get()
142 }
143 return toSerialize, nil
144 }
145 146 type NullableGetZonesResponseLinks struct {
147 value *GetZonesResponseLinks
148 isSet bool
149 }
150 151 func (v NullableGetZonesResponseLinks) Get() *GetZonesResponseLinks {
152 return v.value
153 }
154 155 func (v *NullableGetZonesResponseLinks) Set(val *GetZonesResponseLinks) {
156 v.value = val
157 v.isSet = true
158 }
159 160 func (v NullableGetZonesResponseLinks) IsSet() bool {
161 return v.isSet
162 }
163 164 func (v *NullableGetZonesResponseLinks) Unset() {
165 v.value = nil
166 v.isSet = false
167 }
168 169 func NewNullableGetZonesResponseLinks(val *GetZonesResponseLinks) *NullableGetZonesResponseLinks {
170 return &NullableGetZonesResponseLinks{value: val, isSet: true}
171 }
172 173 func (v NullableGetZonesResponseLinks) MarshalJSON() ([]byte, error) {
174 return json.Marshal(v.value)
175 }
176 177 func (v *NullableGetZonesResponseLinks) UnmarshalJSON(src []byte) error {
178 v.isSet = true
179 return json.Unmarshal(src, &v.value)
180 }
181 182 183