Class: MicrosoftGraph::Models::Photo

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/models/photo.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new photo and sets the default values.



92
93
94
# File 'lib/models/photo.rb', line 92

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a photo

Raises:

  • (StandardError)


100
101
102
103
# File 'lib/models/photo.rb', line 100

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return Photo.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



47
48
49
# File 'lib/models/photo.rb', line 47

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



55
56
57
# File 'lib/models/photo.rb', line 55

def additional_data=(value)
    @additional_data = value
end

#camera_makeObject

Gets the cameraMake property value. Camera manufacturer. Read-only.

Returns:

  • a string



62
63
64
# File 'lib/models/photo.rb', line 62

def camera_make
    return @camera_make
end

#camera_make=(value) ⇒ Object

Sets the cameraMake property value. Camera manufacturer. Read-only.

Parameters:

  • value

    Value to set for the cameraMake property.

Returns:

  • a void



70
71
72
# File 'lib/models/photo.rb', line 70

def camera_make=(value)
    @camera_make = value
end

#camera_modelObject

Gets the cameraModel property value. Camera model. Read-only.

Returns:

  • a string



77
78
79
# File 'lib/models/photo.rb', line 77

def camera_model
    return @camera_model
end

#camera_model=(value) ⇒ Object

Sets the cameraModel property value. Camera model. Read-only.

Parameters:

  • value

    Value to set for the cameraModel property.

Returns:

  • a void



85
86
87
# File 'lib/models/photo.rb', line 85

def camera_model=(value)
    @camera_model = value
end

#exposure_denominatorObject

Gets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only.

Returns:

  • a double



108
109
110
# File 'lib/models/photo.rb', line 108

def exposure_denominator
    return @exposure_denominator
end

#exposure_denominator=(value) ⇒ Object

Sets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only.

Parameters:

  • value

    Value to set for the exposureDenominator property.

Returns:

  • a void



116
117
118
# File 'lib/models/photo.rb', line 116

def exposure_denominator=(value)
    @exposure_denominator = value
end

#exposure_numeratorObject

Gets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only.

Returns:

  • a double



123
124
125
# File 'lib/models/photo.rb', line 123

def exposure_numerator
    return @exposure_numerator
end

#exposure_numerator=(value) ⇒ Object

Sets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only.

Parameters:

  • value

    Value to set for the exposureNumerator property.

Returns:

  • a void



131
132
133
# File 'lib/models/photo.rb', line 131

def exposure_numerator=(value)
    @exposure_numerator = value
end

#f_numberObject

Gets the fNumber property value. The F-stop value from the camera. Read-only.

Returns:

  • a double



138
139
140
# File 'lib/models/photo.rb', line 138

def f_number
    return @f_number
end

#f_number=(value) ⇒ Object

Sets the fNumber property value. The F-stop value from the camera. Read-only.

Parameters:

  • value

    Value to set for the fNumber property.

Returns:

  • a void



146
147
148
# File 'lib/models/photo.rb', line 146

def f_number=(value)
    @f_number = value
end

#focal_lengthObject

Gets the focalLength property value. The focal length from the camera. Read-only.

Returns:

  • a double



153
154
155
# File 'lib/models/photo.rb', line 153

def focal_length
    return @focal_length
end

#focal_length=(value) ⇒ Object

Sets the focalLength property value. The focal length from the camera. Read-only.

Parameters:

  • value

    Value to set for the focalLength property.

Returns:

  • a void



161
162
163
# File 'lib/models/photo.rb', line 161

def focal_length=(value)
    @focal_length = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



168
169
170
171
172
173
174
175
176
177
178
179
180
181
# File 'lib/models/photo.rb', line 168

def get_field_deserializers()
    return {
        "cameraMake" => lambda {|n| @camera_make = n.get_string_value() },
        "cameraModel" => lambda {|n| @camera_model = n.get_string_value() },
        "exposureDenominator" => lambda {|n| @exposure_denominator = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "exposureNumerator" => lambda {|n| @exposure_numerator = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "fNumber" => lambda {|n| @f_number = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "focalLength" => lambda {|n| @focal_length = n.get_object_value(lambda {|pn| Double.create_from_discriminator_value(pn) }) },
        "iso" => lambda {|n| @iso = n.get_number_value() },
        "@odata.type" => lambda {|n| @odata_type = n.get_string_value() },
        "orientation" => lambda {|n| @orientation = n.get_number_value() },
        "takenDateTime" => lambda {|n| @taken_date_time = n.get_date_time_value() },
    }
end

#isoObject

Gets the iso property value. The ISO value from the camera. Read-only.

Returns:

  • a integer



186
187
188
# File 'lib/models/photo.rb', line 186

def iso
    return @iso
end

#iso=(value) ⇒ Object

Sets the iso property value. The ISO value from the camera. Read-only.

Parameters:

  • value

    Value to set for the iso property.

Returns:

  • a void



194
195
196
# File 'lib/models/photo.rb', line 194

def iso=(value)
    @iso = value
end

#odata_typeObject

Gets the @odata.type property value. The OdataType property

Returns:

  • a string



201
202
203
# File 'lib/models/photo.rb', line 201

def odata_type
    return @odata_type
end

#odata_type=(value) ⇒ Object

Sets the @odata.type property value. The OdataType property

Parameters:

  • value

    Value to set for the @odata.type property.

Returns:

  • a void



209
210
211
# File 'lib/models/photo.rb', line 209

def odata_type=(value)
    @odata_type = value
end

#orientationObject

Gets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal.

Returns:

  • a integer



216
217
218
# File 'lib/models/photo.rb', line 216

def orientation
    return @orientation
end

#orientation=(value) ⇒ Object

Sets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal.

Parameters:

  • value

    Value to set for the orientation property.

Returns:

  • a void



224
225
226
# File 'lib/models/photo.rb', line 224

def orientation=(value)
    @orientation = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


232
233
234
235
236
237
238
239
240
241
242
243
244
245
# File 'lib/models/photo.rb', line 232

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_string_value("cameraMake", @camera_make)
    writer.write_string_value("cameraModel", @camera_model)
    writer.write_object_value("exposureDenominator", @exposure_denominator)
    writer.write_object_value("exposureNumerator", @exposure_numerator)
    writer.write_object_value("fNumber", @f_number)
    writer.write_object_value("focalLength", @focal_length)
    writer.write_number_value("iso", @iso)
    writer.write_string_value("@odata.type", @odata_type)
    writer.write_number_value("orientation", @orientation)
    writer.write_date_time_value("takenDateTime", @taken_date_time)
    writer.write_additional_data(@additional_data)
end

#taken_date_timeObject

Gets the takenDateTime property value. Represents the date and time the photo was taken. Read-only.

Returns:

  • a date_time



250
251
252
# File 'lib/models/photo.rb', line 250

def taken_date_time
    return @taken_date_time
end

#taken_date_time=(value) ⇒ Object

Sets the takenDateTime property value. Represents the date and time the photo was taken. Read-only.

Parameters:

  • value

    Value to set for the takenDateTime property.

Returns:

  • a void



258
259
260
# File 'lib/models/photo.rb', line 258

def taken_date_time=(value)
    @taken_date_time = value
end