-
Notifications
You must be signed in to change notification settings - Fork 4
/
model_photo.go
422 lines (358 loc) · 11.3 KB
/
model_photo.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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
/*
Libre Graph API
Libre Graph is a free API for cloud collaboration inspired by the MS Graph API.
API version: v1.0.4
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package libregraph
import (
"encoding/json"
"time"
)
// checks if the Photo type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &Photo{}
// Photo The photo resource provides photo and camera properties, for example, EXIF metadata, on a driveItem.
type Photo struct {
// Camera manufacturer. Read-only.
CameraMake *string `json:"cameraMake,omitempty"`
// Camera model. Read-only.
CameraModel *string `json:"cameraModel,omitempty"`
// The denominator for the exposure time fraction from the camera. Read-only.
ExposureDenominator *float64 `json:"exposureDenominator,omitempty"`
// The numerator for the exposure time fraction from the camera. Read-only.
ExposureNumerator *float64 `json:"exposureNumerator,omitempty"`
// The F-stop value from the camera. Read-only.
FNumber *float64 `json:"fNumber,omitempty"`
// The focal length from the camera. Read-only.
FocalLength *float64 `json:"focalLength,omitempty"`
// The ISO value from the camera. Read-only.
Iso *int32 `json:"iso,omitempty"`
// The orientation value from the camera. Read-only.
Orientation *int32 `json:"orientation,omitempty"`
// Represents the date and time the photo was taken. Read-only.
TakenDateTime *time.Time `json:"takenDateTime,omitempty" validate:"regexp=^[0-9]{4,}-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]([.][0-9]{1,12})?([Zz]|[+-][0-9][0-9]:[0-9][0-9])$"`
}
// NewPhoto instantiates a new Photo 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 NewPhoto() *Photo {
this := Photo{}
return &this
}
// NewPhotoWithDefaults instantiates a new Photo 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 NewPhotoWithDefaults() *Photo {
this := Photo{}
return &this
}
// GetCameraMake returns the CameraMake field value if set, zero value otherwise.
func (o *Photo) GetCameraMake() string {
if o == nil || IsNil(o.CameraMake) {
var ret string
return ret
}
return *o.CameraMake
}
// GetCameraMakeOk returns a tuple with the CameraMake field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetCameraMakeOk() (*string, bool) {
if o == nil || IsNil(o.CameraMake) {
return nil, false
}
return o.CameraMake, true
}
// HasCameraMake returns a boolean if a field has been set.
func (o *Photo) HasCameraMake() bool {
if o != nil && !IsNil(o.CameraMake) {
return true
}
return false
}
// SetCameraMake gets a reference to the given string and assigns it to the CameraMake field.
func (o *Photo) SetCameraMake(v string) {
o.CameraMake = &v
}
// GetCameraModel returns the CameraModel field value if set, zero value otherwise.
func (o *Photo) GetCameraModel() string {
if o == nil || IsNil(o.CameraModel) {
var ret string
return ret
}
return *o.CameraModel
}
// GetCameraModelOk returns a tuple with the CameraModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetCameraModelOk() (*string, bool) {
if o == nil || IsNil(o.CameraModel) {
return nil, false
}
return o.CameraModel, true
}
// HasCameraModel returns a boolean if a field has been set.
func (o *Photo) HasCameraModel() bool {
if o != nil && !IsNil(o.CameraModel) {
return true
}
return false
}
// SetCameraModel gets a reference to the given string and assigns it to the CameraModel field.
func (o *Photo) SetCameraModel(v string) {
o.CameraModel = &v
}
// GetExposureDenominator returns the ExposureDenominator field value if set, zero value otherwise.
func (o *Photo) GetExposureDenominator() float64 {
if o == nil || IsNil(o.ExposureDenominator) {
var ret float64
return ret
}
return *o.ExposureDenominator
}
// GetExposureDenominatorOk returns a tuple with the ExposureDenominator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetExposureDenominatorOk() (*float64, bool) {
if o == nil || IsNil(o.ExposureDenominator) {
return nil, false
}
return o.ExposureDenominator, true
}
// HasExposureDenominator returns a boolean if a field has been set.
func (o *Photo) HasExposureDenominator() bool {
if o != nil && !IsNil(o.ExposureDenominator) {
return true
}
return false
}
// SetExposureDenominator gets a reference to the given float64 and assigns it to the ExposureDenominator field.
func (o *Photo) SetExposureDenominator(v float64) {
o.ExposureDenominator = &v
}
// GetExposureNumerator returns the ExposureNumerator field value if set, zero value otherwise.
func (o *Photo) GetExposureNumerator() float64 {
if o == nil || IsNil(o.ExposureNumerator) {
var ret float64
return ret
}
return *o.ExposureNumerator
}
// GetExposureNumeratorOk returns a tuple with the ExposureNumerator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetExposureNumeratorOk() (*float64, bool) {
if o == nil || IsNil(o.ExposureNumerator) {
return nil, false
}
return o.ExposureNumerator, true
}
// HasExposureNumerator returns a boolean if a field has been set.
func (o *Photo) HasExposureNumerator() bool {
if o != nil && !IsNil(o.ExposureNumerator) {
return true
}
return false
}
// SetExposureNumerator gets a reference to the given float64 and assigns it to the ExposureNumerator field.
func (o *Photo) SetExposureNumerator(v float64) {
o.ExposureNumerator = &v
}
// GetFNumber returns the FNumber field value if set, zero value otherwise.
func (o *Photo) GetFNumber() float64 {
if o == nil || IsNil(o.FNumber) {
var ret float64
return ret
}
return *o.FNumber
}
// GetFNumberOk returns a tuple with the FNumber field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetFNumberOk() (*float64, bool) {
if o == nil || IsNil(o.FNumber) {
return nil, false
}
return o.FNumber, true
}
// HasFNumber returns a boolean if a field has been set.
func (o *Photo) HasFNumber() bool {
if o != nil && !IsNil(o.FNumber) {
return true
}
return false
}
// SetFNumber gets a reference to the given float64 and assigns it to the FNumber field.
func (o *Photo) SetFNumber(v float64) {
o.FNumber = &v
}
// GetFocalLength returns the FocalLength field value if set, zero value otherwise.
func (o *Photo) GetFocalLength() float64 {
if o == nil || IsNil(o.FocalLength) {
var ret float64
return ret
}
return *o.FocalLength
}
// GetFocalLengthOk returns a tuple with the FocalLength field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetFocalLengthOk() (*float64, bool) {
if o == nil || IsNil(o.FocalLength) {
return nil, false
}
return o.FocalLength, true
}
// HasFocalLength returns a boolean if a field has been set.
func (o *Photo) HasFocalLength() bool {
if o != nil && !IsNil(o.FocalLength) {
return true
}
return false
}
// SetFocalLength gets a reference to the given float64 and assigns it to the FocalLength field.
func (o *Photo) SetFocalLength(v float64) {
o.FocalLength = &v
}
// GetIso returns the Iso field value if set, zero value otherwise.
func (o *Photo) GetIso() int32 {
if o == nil || IsNil(o.Iso) {
var ret int32
return ret
}
return *o.Iso
}
// GetIsoOk returns a tuple with the Iso field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetIsoOk() (*int32, bool) {
if o == nil || IsNil(o.Iso) {
return nil, false
}
return o.Iso, true
}
// HasIso returns a boolean if a field has been set.
func (o *Photo) HasIso() bool {
if o != nil && !IsNil(o.Iso) {
return true
}
return false
}
// SetIso gets a reference to the given int32 and assigns it to the Iso field.
func (o *Photo) SetIso(v int32) {
o.Iso = &v
}
// GetOrientation returns the Orientation field value if set, zero value otherwise.
func (o *Photo) GetOrientation() int32 {
if o == nil || IsNil(o.Orientation) {
var ret int32
return ret
}
return *o.Orientation
}
// GetOrientationOk returns a tuple with the Orientation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetOrientationOk() (*int32, bool) {
if o == nil || IsNil(o.Orientation) {
return nil, false
}
return o.Orientation, true
}
// HasOrientation returns a boolean if a field has been set.
func (o *Photo) HasOrientation() bool {
if o != nil && !IsNil(o.Orientation) {
return true
}
return false
}
// SetOrientation gets a reference to the given int32 and assigns it to the Orientation field.
func (o *Photo) SetOrientation(v int32) {
o.Orientation = &v
}
// GetTakenDateTime returns the TakenDateTime field value if set, zero value otherwise.
func (o *Photo) GetTakenDateTime() time.Time {
if o == nil || IsNil(o.TakenDateTime) {
var ret time.Time
return ret
}
return *o.TakenDateTime
}
// GetTakenDateTimeOk returns a tuple with the TakenDateTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Photo) GetTakenDateTimeOk() (*time.Time, bool) {
if o == nil || IsNil(o.TakenDateTime) {
return nil, false
}
return o.TakenDateTime, true
}
// HasTakenDateTime returns a boolean if a field has been set.
func (o *Photo) HasTakenDateTime() bool {
if o != nil && !IsNil(o.TakenDateTime) {
return true
}
return false
}
// SetTakenDateTime gets a reference to the given time.Time and assigns it to the TakenDateTime field.
func (o *Photo) SetTakenDateTime(v time.Time) {
o.TakenDateTime = &v
}
func (o Photo) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o Photo) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CameraMake) {
toSerialize["cameraMake"] = o.CameraMake
}
if !IsNil(o.CameraModel) {
toSerialize["cameraModel"] = o.CameraModel
}
if !IsNil(o.ExposureDenominator) {
toSerialize["exposureDenominator"] = o.ExposureDenominator
}
if !IsNil(o.ExposureNumerator) {
toSerialize["exposureNumerator"] = o.ExposureNumerator
}
if !IsNil(o.FNumber) {
toSerialize["fNumber"] = o.FNumber
}
if !IsNil(o.FocalLength) {
toSerialize["focalLength"] = o.FocalLength
}
if !IsNil(o.Iso) {
toSerialize["iso"] = o.Iso
}
if !IsNil(o.Orientation) {
toSerialize["orientation"] = o.Orientation
}
if !IsNil(o.TakenDateTime) {
toSerialize["takenDateTime"] = o.TakenDateTime
}
return toSerialize, nil
}
type NullablePhoto struct {
value *Photo
isSet bool
}
func (v NullablePhoto) Get() *Photo {
return v.value
}
func (v *NullablePhoto) Set(val *Photo) {
v.value = val
v.isSet = true
}
func (v NullablePhoto) IsSet() bool {
return v.isSet
}
func (v *NullablePhoto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePhoto(val *Photo) *NullablePhoto {
return &NullablePhoto{value: val, isSet: true}
}
func (v NullablePhoto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePhoto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}