-
Notifications
You must be signed in to change notification settings - Fork 0
/
photo.go
331 lines (329 loc) · 12 KB
/
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
package models
import (
i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time"
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization"
)
// Photo
type Photo struct {
// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
additionalData map[string]any
// Camera manufacturer. Read-only.
cameraMake *string
// Camera model. Read-only.
cameraModel *string
// The denominator for the exposure time fraction from the camera. Read-only.
exposureDenominator *float64
// The numerator for the exposure time fraction from the camera. Read-only.
exposureNumerator *float64
// The F-stop value from the camera. Read-only.
fNumber *float64
// The focal length from the camera. Read-only.
focalLength *float64
// The ISO value from the camera. Read-only.
iso *int32
// The OdataType property
odataType *string
// The orientation value from the camera. Writable on OneDrive Personal.
orientation *int32
// Represents the date and time the photo was taken. Read-only.
takenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time
}
// NewPhoto instantiates a new photo and sets the default values.
func NewPhoto()(*Photo) {
m := &Photo{
}
m.SetAdditionalData(make(map[string]any))
return m
}
// CreatePhotoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value
func CreatePhotoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) {
return NewPhoto(), nil
}
// GetAdditionalData gets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *Photo) GetAdditionalData()(map[string]any) {
return m.additionalData
}
// GetCameraMake gets the cameraMake property value. Camera manufacturer. Read-only.
func (m *Photo) GetCameraMake()(*string) {
return m.cameraMake
}
// GetCameraModel gets the cameraModel property value. Camera model. Read-only.
func (m *Photo) GetCameraModel()(*string) {
return m.cameraModel
}
// GetExposureDenominator gets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only.
func (m *Photo) GetExposureDenominator()(*float64) {
return m.exposureDenominator
}
// GetExposureNumerator gets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only.
func (m *Photo) GetExposureNumerator()(*float64) {
return m.exposureNumerator
}
// GetFieldDeserializers the deserialization information for the current model
func (m *Photo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) {
res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error))
res["cameraMake"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetCameraMake(val)
}
return nil
}
res["cameraModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetCameraModel(val)
}
return nil
}
res["exposureDenominator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetExposureDenominator(val)
}
return nil
}
res["exposureNumerator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetExposureNumerator(val)
}
return nil
}
res["fNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetFNumber(val)
}
return nil
}
res["focalLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetFloat64Value()
if err != nil {
return err
}
if val != nil {
m.SetFocalLength(val)
}
return nil
}
res["iso"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetIso(val)
}
return nil
}
res["@odata.type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetStringValue()
if err != nil {
return err
}
if val != nil {
m.SetOdataType(val)
}
return nil
}
res["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetInt32Value()
if err != nil {
return err
}
if val != nil {
m.SetOrientation(val)
}
return nil
}
res["takenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error {
val, err := n.GetTimeValue()
if err != nil {
return err
}
if val != nil {
m.SetTakenDateTime(val)
}
return nil
}
return res
}
// GetFNumber gets the fNumber property value. The F-stop value from the camera. Read-only.
func (m *Photo) GetFNumber()(*float64) {
return m.fNumber
}
// GetFocalLength gets the focalLength property value. The focal length from the camera. Read-only.
func (m *Photo) GetFocalLength()(*float64) {
return m.focalLength
}
// GetIso gets the iso property value. The ISO value from the camera. Read-only.
func (m *Photo) GetIso()(*int32) {
return m.iso
}
// GetOdataType gets the @odata.type property value. The OdataType property
func (m *Photo) GetOdataType()(*string) {
return m.odataType
}
// GetOrientation gets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal.
func (m *Photo) GetOrientation()(*int32) {
return m.orientation
}
// GetTakenDateTime gets the takenDateTime property value. Represents the date and time the photo was taken. Read-only.
func (m *Photo) GetTakenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) {
return m.takenDateTime
}
// Serialize serializes information the current object
func (m *Photo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) {
{
err := writer.WriteStringValue("cameraMake", m.GetCameraMake())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("cameraModel", m.GetCameraModel())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("exposureDenominator", m.GetExposureDenominator())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("exposureNumerator", m.GetExposureNumerator())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("fNumber", m.GetFNumber())
if err != nil {
return err
}
}
{
err := writer.WriteFloat64Value("focalLength", m.GetFocalLength())
if err != nil {
return err
}
}
{
err := writer.WriteInt32Value("iso", m.GetIso())
if err != nil {
return err
}
}
{
err := writer.WriteStringValue("@odata.type", m.GetOdataType())
if err != nil {
return err
}
}
{
err := writer.WriteInt32Value("orientation", m.GetOrientation())
if err != nil {
return err
}
}
{
err := writer.WriteTimeValue("takenDateTime", m.GetTakenDateTime())
if err != nil {
return err
}
}
{
err := writer.WriteAdditionalData(m.GetAdditionalData())
if err != nil {
return err
}
}
return nil
}
// SetAdditionalData sets the AdditionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
func (m *Photo) SetAdditionalData(value map[string]any)() {
m.additionalData = value
}
// SetCameraMake sets the cameraMake property value. Camera manufacturer. Read-only.
func (m *Photo) SetCameraMake(value *string)() {
m.cameraMake = value
}
// SetCameraModel sets the cameraModel property value. Camera model. Read-only.
func (m *Photo) SetCameraModel(value *string)() {
m.cameraModel = value
}
// SetExposureDenominator sets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only.
func (m *Photo) SetExposureDenominator(value *float64)() {
m.exposureDenominator = value
}
// SetExposureNumerator sets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only.
func (m *Photo) SetExposureNumerator(value *float64)() {
m.exposureNumerator = value
}
// SetFNumber sets the fNumber property value. The F-stop value from the camera. Read-only.
func (m *Photo) SetFNumber(value *float64)() {
m.fNumber = value
}
// SetFocalLength sets the focalLength property value. The focal length from the camera. Read-only.
func (m *Photo) SetFocalLength(value *float64)() {
m.focalLength = value
}
// SetIso sets the iso property value. The ISO value from the camera. Read-only.
func (m *Photo) SetIso(value *int32)() {
m.iso = value
}
// SetOdataType sets the @odata.type property value. The OdataType property
func (m *Photo) SetOdataType(value *string)() {
m.odataType = value
}
// SetOrientation sets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal.
func (m *Photo) SetOrientation(value *int32)() {
m.orientation = value
}
// SetTakenDateTime sets the takenDateTime property value. Represents the date and time the photo was taken. Read-only.
func (m *Photo) SetTakenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() {
m.takenDateTime = value
}
// Photoable
type Photoable interface {
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder
i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable
GetCameraMake()(*string)
GetCameraModel()(*string)
GetExposureDenominator()(*float64)
GetExposureNumerator()(*float64)
GetFNumber()(*float64)
GetFocalLength()(*float64)
GetIso()(*int32)
GetOdataType()(*string)
GetOrientation()(*int32)
GetTakenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)
SetCameraMake(value *string)()
SetCameraModel(value *string)()
SetExposureDenominator(value *float64)()
SetExposureNumerator(value *float64)()
SetFNumber(value *float64)()
SetFocalLength(value *float64)()
SetIso(value *int32)()
SetOdataType(value *string)()
SetOrientation(value *int32)()
SetTakenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)()
}