-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel_get_account_settings_200_response.go
276 lines (230 loc) · 9.08 KB
/
model_get_account_settings_200_response.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
/*
Linode API
[Read the API documentation](https://techdocs.akamai.com/linode-api/reference/api).
API version: 4.189.2
Contact: support@linode.com
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the GetAccountSettings200Response type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &GetAccountSettings200Response{}
// GetAccountSettings200Response Account Settings object.
type GetAccountSettings200Response struct {
// Account-wide backups default. If `true`, all Linodes created will automatically be enrolled in the Backups service. If `false`, Linodes will not be enrolled by default, but may still be enrolled on creation or later.
BackupsEnabled *bool `json:"backups_enabled,omitempty"`
// The Longview Pro tier you are currently subscribed to. The value must be a [Longview subscription](https://techdocs.akamai.com/linode-api/reference/get-longview-subscriptions) ID or `null` for Longview Free.
LongviewSubscription *string `json:"longview_subscription,omitempty"`
// Our 24/7 incident response service. This robust, multi-homed monitoring system distributes monitoring checks to ensure that your servers remain online and available at all times. Linode Managed can monitor any service or software stack reachable over TCP or HTTP. Once you add a service to Linode Managed, we'll monitor it for connectivity, response, and total request time.
Managed *bool `json:"managed,omitempty"`
// Enables network helper across all users by default for new Linodes and Linode Configs.
NetworkHelper *bool `json:"network_helper,omitempty"`
// A string describing the status of this account's Object Storage service enrollment.
ObjectStorage *string `json:"object_storage,omitempty"`
}
// NewGetAccountSettings200Response instantiates a new GetAccountSettings200Response 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 NewGetAccountSettings200Response() *GetAccountSettings200Response {
this := GetAccountSettings200Response{}
return &this
}
// NewGetAccountSettings200ResponseWithDefaults instantiates a new GetAccountSettings200Response 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 NewGetAccountSettings200ResponseWithDefaults() *GetAccountSettings200Response {
this := GetAccountSettings200Response{}
return &this
}
// GetBackupsEnabled returns the BackupsEnabled field value if set, zero value otherwise.
func (o *GetAccountSettings200Response) GetBackupsEnabled() bool {
if o == nil || IsNil(o.BackupsEnabled) {
var ret bool
return ret
}
return *o.BackupsEnabled
}
// GetBackupsEnabledOk returns a tuple with the BackupsEnabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAccountSettings200Response) GetBackupsEnabledOk() (*bool, bool) {
if o == nil || IsNil(o.BackupsEnabled) {
return nil, false
}
return o.BackupsEnabled, true
}
// HasBackupsEnabled returns a boolean if a field has been set.
func (o *GetAccountSettings200Response) HasBackupsEnabled() bool {
if o != nil && !IsNil(o.BackupsEnabled) {
return true
}
return false
}
// SetBackupsEnabled gets a reference to the given bool and assigns it to the BackupsEnabled field.
func (o *GetAccountSettings200Response) SetBackupsEnabled(v bool) {
o.BackupsEnabled = &v
}
// GetLongviewSubscription returns the LongviewSubscription field value if set, zero value otherwise.
func (o *GetAccountSettings200Response) GetLongviewSubscription() string {
if o == nil || IsNil(o.LongviewSubscription) {
var ret string
return ret
}
return *o.LongviewSubscription
}
// GetLongviewSubscriptionOk returns a tuple with the LongviewSubscription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAccountSettings200Response) GetLongviewSubscriptionOk() (*string, bool) {
if o == nil || IsNil(o.LongviewSubscription) {
return nil, false
}
return o.LongviewSubscription, true
}
// HasLongviewSubscription returns a boolean if a field has been set.
func (o *GetAccountSettings200Response) HasLongviewSubscription() bool {
if o != nil && !IsNil(o.LongviewSubscription) {
return true
}
return false
}
// SetLongviewSubscription gets a reference to the given string and assigns it to the LongviewSubscription field.
func (o *GetAccountSettings200Response) SetLongviewSubscription(v string) {
o.LongviewSubscription = &v
}
// GetManaged returns the Managed field value if set, zero value otherwise.
func (o *GetAccountSettings200Response) GetManaged() bool {
if o == nil || IsNil(o.Managed) {
var ret bool
return ret
}
return *o.Managed
}
// GetManagedOk returns a tuple with the Managed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAccountSettings200Response) GetManagedOk() (*bool, bool) {
if o == nil || IsNil(o.Managed) {
return nil, false
}
return o.Managed, true
}
// HasManaged returns a boolean if a field has been set.
func (o *GetAccountSettings200Response) HasManaged() bool {
if o != nil && !IsNil(o.Managed) {
return true
}
return false
}
// SetManaged gets a reference to the given bool and assigns it to the Managed field.
func (o *GetAccountSettings200Response) SetManaged(v bool) {
o.Managed = &v
}
// GetNetworkHelper returns the NetworkHelper field value if set, zero value otherwise.
func (o *GetAccountSettings200Response) GetNetworkHelper() bool {
if o == nil || IsNil(o.NetworkHelper) {
var ret bool
return ret
}
return *o.NetworkHelper
}
// GetNetworkHelperOk returns a tuple with the NetworkHelper field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAccountSettings200Response) GetNetworkHelperOk() (*bool, bool) {
if o == nil || IsNil(o.NetworkHelper) {
return nil, false
}
return o.NetworkHelper, true
}
// HasNetworkHelper returns a boolean if a field has been set.
func (o *GetAccountSettings200Response) HasNetworkHelper() bool {
if o != nil && !IsNil(o.NetworkHelper) {
return true
}
return false
}
// SetNetworkHelper gets a reference to the given bool and assigns it to the NetworkHelper field.
func (o *GetAccountSettings200Response) SetNetworkHelper(v bool) {
o.NetworkHelper = &v
}
// GetObjectStorage returns the ObjectStorage field value if set, zero value otherwise.
func (o *GetAccountSettings200Response) GetObjectStorage() string {
if o == nil || IsNil(o.ObjectStorage) {
var ret string
return ret
}
return *o.ObjectStorage
}
// GetObjectStorageOk returns a tuple with the ObjectStorage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *GetAccountSettings200Response) GetObjectStorageOk() (*string, bool) {
if o == nil || IsNil(o.ObjectStorage) {
return nil, false
}
return o.ObjectStorage, true
}
// HasObjectStorage returns a boolean if a field has been set.
func (o *GetAccountSettings200Response) HasObjectStorage() bool {
if o != nil && !IsNil(o.ObjectStorage) {
return true
}
return false
}
// SetObjectStorage gets a reference to the given string and assigns it to the ObjectStorage field.
func (o *GetAccountSettings200Response) SetObjectStorage(v string) {
o.ObjectStorage = &v
}
func (o GetAccountSettings200Response) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o GetAccountSettings200Response) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.BackupsEnabled) {
toSerialize["backups_enabled"] = o.BackupsEnabled
}
if !IsNil(o.LongviewSubscription) {
toSerialize["longview_subscription"] = o.LongviewSubscription
}
if !IsNil(o.Managed) {
toSerialize["managed"] = o.Managed
}
if !IsNil(o.NetworkHelper) {
toSerialize["network_helper"] = o.NetworkHelper
}
if !IsNil(o.ObjectStorage) {
toSerialize["object_storage"] = o.ObjectStorage
}
return toSerialize, nil
}
type NullableGetAccountSettings200Response struct {
value *GetAccountSettings200Response
isSet bool
}
func (v NullableGetAccountSettings200Response) Get() *GetAccountSettings200Response {
return v.value
}
func (v *NullableGetAccountSettings200Response) Set(val *GetAccountSettings200Response) {
v.value = val
v.isSet = true
}
func (v NullableGetAccountSettings200Response) IsSet() bool {
return v.isSet
}
func (v *NullableGetAccountSettings200Response) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableGetAccountSettings200Response(val *GetAccountSettings200Response) *NullableGetAccountSettings200Response {
return &NullableGetAccountSettings200Response{value: val, isSet: true}
}
func (v NullableGetAccountSettings200Response) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableGetAccountSettings200Response) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}