/
model_log_file_resource.go
301 lines (252 loc) · 8.25 KB
/
model_log_file_resource.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
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
/*
Radarr
Radarr API docs
API version: v5.3.6.8612
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package radarr
import (
"encoding/json"
"time"
)
// checks if the LogFileResource type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LogFileResource{}
// LogFileResource struct for LogFileResource
type LogFileResource struct {
Id *int32 `json:"id,omitempty"`
Filename NullableString `json:"filename,omitempty"`
LastWriteTime *time.Time `json:"lastWriteTime,omitempty"`
ContentsUrl NullableString `json:"contentsUrl,omitempty"`
DownloadUrl NullableString `json:"downloadUrl,omitempty"`
}
// NewLogFileResource instantiates a new LogFileResource 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 NewLogFileResource() *LogFileResource {
this := LogFileResource{}
return &this
}
// NewLogFileResourceWithDefaults instantiates a new LogFileResource 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 NewLogFileResourceWithDefaults() *LogFileResource {
this := LogFileResource{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *LogFileResource) GetId() int32 {
if o == nil || IsNil(o.Id) {
var ret int32
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogFileResource) GetIdOk() (*int32, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *LogFileResource) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given int32 and assigns it to the Id field.
func (o *LogFileResource) SetId(v int32) {
o.Id = &v
}
// GetFilename returns the Filename field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *LogFileResource) GetFilename() string {
if o == nil || IsNil(o.Filename.Get()) {
var ret string
return ret
}
return *o.Filename.Get()
}
// GetFilenameOk returns a tuple with the Filename field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *LogFileResource) GetFilenameOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.Filename.Get(), o.Filename.IsSet()
}
// HasFilename returns a boolean if a field has been set.
func (o *LogFileResource) HasFilename() bool {
if o != nil && o.Filename.IsSet() {
return true
}
return false
}
// SetFilename gets a reference to the given NullableString and assigns it to the Filename field.
func (o *LogFileResource) SetFilename(v string) {
o.Filename.Set(&v)
}
// SetFilenameNil sets the value for Filename to be an explicit nil
func (o *LogFileResource) SetFilenameNil() {
o.Filename.Set(nil)
}
// UnsetFilename ensures that no value is present for Filename, not even an explicit nil
func (o *LogFileResource) UnsetFilename() {
o.Filename.Unset()
}
// GetLastWriteTime returns the LastWriteTime field value if set, zero value otherwise.
func (o *LogFileResource) GetLastWriteTime() time.Time {
if o == nil || IsNil(o.LastWriteTime) {
var ret time.Time
return ret
}
return *o.LastWriteTime
}
// GetLastWriteTimeOk returns a tuple with the LastWriteTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LogFileResource) GetLastWriteTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.LastWriteTime) {
return nil, false
}
return o.LastWriteTime, true
}
// HasLastWriteTime returns a boolean if a field has been set.
func (o *LogFileResource) HasLastWriteTime() bool {
if o != nil && !IsNil(o.LastWriteTime) {
return true
}
return false
}
// SetLastWriteTime gets a reference to the given time.Time and assigns it to the LastWriteTime field.
func (o *LogFileResource) SetLastWriteTime(v time.Time) {
o.LastWriteTime = &v
}
// GetContentsUrl returns the ContentsUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *LogFileResource) GetContentsUrl() string {
if o == nil || IsNil(o.ContentsUrl.Get()) {
var ret string
return ret
}
return *o.ContentsUrl.Get()
}
// GetContentsUrlOk returns a tuple with the ContentsUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *LogFileResource) GetContentsUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.ContentsUrl.Get(), o.ContentsUrl.IsSet()
}
// HasContentsUrl returns a boolean if a field has been set.
func (o *LogFileResource) HasContentsUrl() bool {
if o != nil && o.ContentsUrl.IsSet() {
return true
}
return false
}
// SetContentsUrl gets a reference to the given NullableString and assigns it to the ContentsUrl field.
func (o *LogFileResource) SetContentsUrl(v string) {
o.ContentsUrl.Set(&v)
}
// SetContentsUrlNil sets the value for ContentsUrl to be an explicit nil
func (o *LogFileResource) SetContentsUrlNil() {
o.ContentsUrl.Set(nil)
}
// UnsetContentsUrl ensures that no value is present for ContentsUrl, not even an explicit nil
func (o *LogFileResource) UnsetContentsUrl() {
o.ContentsUrl.Unset()
}
// GetDownloadUrl returns the DownloadUrl field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *LogFileResource) GetDownloadUrl() string {
if o == nil || IsNil(o.DownloadUrl.Get()) {
var ret string
return ret
}
return *o.DownloadUrl.Get()
}
// GetDownloadUrlOk returns a tuple with the DownloadUrl field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *LogFileResource) GetDownloadUrlOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.DownloadUrl.Get(), o.DownloadUrl.IsSet()
}
// HasDownloadUrl returns a boolean if a field has been set.
func (o *LogFileResource) HasDownloadUrl() bool {
if o != nil && o.DownloadUrl.IsSet() {
return true
}
return false
}
// SetDownloadUrl gets a reference to the given NullableString and assigns it to the DownloadUrl field.
func (o *LogFileResource) SetDownloadUrl(v string) {
o.DownloadUrl.Set(&v)
}
// SetDownloadUrlNil sets the value for DownloadUrl to be an explicit nil
func (o *LogFileResource) SetDownloadUrlNil() {
o.DownloadUrl.Set(nil)
}
// UnsetDownloadUrl ensures that no value is present for DownloadUrl, not even an explicit nil
func (o *LogFileResource) UnsetDownloadUrl() {
o.DownloadUrl.Unset()
}
func (o LogFileResource) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LogFileResource) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if o.Filename.IsSet() {
toSerialize["filename"] = o.Filename.Get()
}
if !IsNil(o.LastWriteTime) {
toSerialize["lastWriteTime"] = o.LastWriteTime
}
if o.ContentsUrl.IsSet() {
toSerialize["contentsUrl"] = o.ContentsUrl.Get()
}
if o.DownloadUrl.IsSet() {
toSerialize["downloadUrl"] = o.DownloadUrl.Get()
}
return toSerialize, nil
}
type NullableLogFileResource struct {
value *LogFileResource
isSet bool
}
func (v NullableLogFileResource) Get() *LogFileResource {
return v.value
}
func (v *NullableLogFileResource) Set(val *LogFileResource) {
v.value = val
v.isSet = true
}
func (v NullableLogFileResource) IsSet() bool {
return v.isSet
}
func (v *NullableLogFileResource) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLogFileResource(val *LogFileResource) *NullableLogFileResource {
return &NullableLogFileResource{value: val, isSet: true}
}
func (v NullableLogFileResource) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLogFileResource) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}