Class: MicrosoftGraph::Models::AttachmentInfo
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::AttachmentInfo
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/attachment_info.rb
Class Method Summary collapse
-
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value.
Instance Method Summary collapse
-
#additional_data ⇒ Object
Gets the additionalData property value.
-
#additional_data=(value) ⇒ Object
Sets the additionalData property value.
-
#attachment_type ⇒ Object
Gets the attachmentType property value.
-
#attachment_type=(value) ⇒ Object
Sets the attachmentType property value.
-
#content_type ⇒ Object
Gets the contentType property value.
-
#content_type=(value) ⇒ Object
Sets the contentType property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new attachmentInfo and sets the default values.
-
#name ⇒ Object
Gets the name property value.
-
#name=(value) ⇒ Object
Sets the name property value.
-
#odata_type ⇒ Object
Gets the @odata.type property value.
-
#odata_type=(value) ⇒ Object
Sets the @odata.type property value.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
-
#size ⇒ Object
Gets the size property value.
-
#size=(value) ⇒ Object
Sets the size property value.
Constructor Details
#initialize ⇒ Object
Instantiates a new attachmentInfo and sets the default values.
61 62 63 |
# File 'lib/models/attachment_info.rb', line 61 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
84 85 86 87 |
# File 'lib/models/attachment_info.rb', line 84 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return AttachmentInfo.new end |
Instance Method Details
#additional_data ⇒ Object
Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.
31 32 33 |
# File 'lib/models/attachment_info.rb', line 31 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.
39 40 41 |
# File 'lib/models/attachment_info.rb', line 39 def additional_data=(value) @additional_data = value end |
#attachment_type ⇒ Object
Gets the attachmentType property value. The type of the attachment. The possible values are: file, item, reference. Required.
46 47 48 |
# File 'lib/models/attachment_info.rb', line 46 def return @attachment_type end |
#attachment_type=(value) ⇒ Object
Sets the attachmentType property value. The type of the attachment. The possible values are: file, item, reference. Required.
54 55 56 |
# File 'lib/models/attachment_info.rb', line 54 def (value) @attachment_type = value end |
#content_type ⇒ Object
Gets the contentType property value. The nature of the data in the attachment. Optional.
68 69 70 |
# File 'lib/models/attachment_info.rb', line 68 def content_type return @content_type end |
#content_type=(value) ⇒ Object
Sets the contentType property value. The nature of the data in the attachment. Optional.
76 77 78 |
# File 'lib/models/attachment_info.rb', line 76 def content_type=(value) @content_type = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
92 93 94 95 96 97 98 99 100 |
# File 'lib/models/attachment_info.rb', line 92 def get_field_deserializers() return { "attachmentType" => lambda {|n| @attachment_type = n.get_enum_value(MicrosoftGraph::Models::AttachmentType) }, "contentType" => lambda {|n| @content_type = n.get_string_value() }, "name" => lambda {|n| @name = n.get_string_value() }, "@odata.type" => lambda {|n| @odata_type = n.get_string_value() }, "size" => lambda {|n| @size = n.get_object_value(lambda {|pn| Int64.create_from_discriminator_value(pn) }) }, } end |
#name ⇒ Object
Gets the name property value. The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required.
105 106 107 |
# File 'lib/models/attachment_info.rb', line 105 def name return @name end |
#name=(value) ⇒ Object
Sets the name property value. The display name of the attachment. This can be a descriptive string and does not have to be the actual file name. Required.
113 114 115 |
# File 'lib/models/attachment_info.rb', line 113 def name=(value) @name = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
120 121 122 |
# File 'lib/models/attachment_info.rb', line 120 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
128 129 130 |
# File 'lib/models/attachment_info.rb', line 128 def odata_type=(value) @odata_type = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
136 137 138 139 140 141 142 143 144 |
# File 'lib/models/attachment_info.rb', line 136 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_enum_value("attachmentType", @attachment_type) writer.write_string_value("contentType", @content_type) writer.write_string_value("name", @name) writer.write_string_value("@odata.type", @odata_type) writer.write_object_value("size", @size) writer.write_additional_data(@additional_data) end |
#size ⇒ Object
Gets the size property value. The length of the attachment in bytes. Required.
149 150 151 |
# File 'lib/models/attachment_info.rb', line 149 def size return @size end |
#size=(value) ⇒ Object
Sets the size property value. The length of the attachment in bytes. Required.
157 158 159 |
# File 'lib/models/attachment_info.rb', line 157 def size=(value) @size = value end |