Class: MicrosoftGraph::Models::AttachmentItem
- Inherits:
-
Object
- Object
- MicrosoftGraph::Models::AttachmentItem
- Includes:
- MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/attachment_item.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_id ⇒ Object
Gets the contentId property value.
-
#content_id=(value) ⇒ Object
Sets the contentId 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 attachmentItem and sets the default values.
-
#is_inline ⇒ Object
Gets the isInline property value.
-
#is_inline=(value) ⇒ Object
Sets the isInline property value.
-
#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 attachmentItem and sets the default values.
67 68 69 |
# File 'lib/models/attachment_item.rb', line 67 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
105 106 107 108 |
# File 'lib/models/attachment_item.rb', line 105 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return AttachmentItem.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.
37 38 39 |
# File 'lib/models/attachment_item.rb', line 37 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.
45 46 47 |
# File 'lib/models/attachment_item.rb', line 45 def additional_data=(value) @additional_data = value end |
#attachment_type ⇒ Object
Gets the attachmentType property value. The type of attachment. Possible values are: file, item, reference. Required.
52 53 54 |
# File 'lib/models/attachment_item.rb', line 52 def return @attachment_type end |
#attachment_type=(value) ⇒ Object
Sets the attachmentType property value. The type of attachment. Possible values are: file, item, reference. Required.
60 61 62 |
# File 'lib/models/attachment_item.rb', line 60 def (value) @attachment_type = value end |
#content_id ⇒ Object
Gets the contentId property value. The CID or Content-Id of the attachment for referencing in case of in-line attachments using <img src=‘cid:contentId’> tag in HTML messages. Optional.
74 75 76 |
# File 'lib/models/attachment_item.rb', line 74 def content_id return @content_id end |
#content_id=(value) ⇒ Object
Sets the contentId property value. The CID or Content-Id of the attachment for referencing in case of in-line attachments using <img src=‘cid:contentId’> tag in HTML messages. Optional.
82 83 84 |
# File 'lib/models/attachment_item.rb', line 82 def content_id=(value) @content_id = value end |
#content_type ⇒ Object
Gets the contentType property value. The nature of the data in the attachment. Optional.
89 90 91 |
# File 'lib/models/attachment_item.rb', line 89 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.
97 98 99 |
# File 'lib/models/attachment_item.rb', line 97 def content_type=(value) @content_type = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/models/attachment_item.rb', line 113 def get_field_deserializers() return { "attachmentType" => lambda {|n| @attachment_type = n.get_enum_value(MicrosoftGraph::Models::AttachmentType) }, "contentId" => lambda {|n| @content_id = n.get_string_value() }, "contentType" => lambda {|n| @content_type = n.get_string_value() }, "isInline" => lambda {|n| @is_inline = n.get_boolean_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 |
#is_inline ⇒ Object
Gets the isInline property value. true if the attachment is an inline attachment; otherwise, false. Optional.
128 129 130 |
# File 'lib/models/attachment_item.rb', line 128 def is_inline return @is_inline end |
#is_inline=(value) ⇒ Object
Sets the isInline property value. true if the attachment is an inline attachment; otherwise, false. Optional.
136 137 138 |
# File 'lib/models/attachment_item.rb', line 136 def is_inline=(value) @is_inline = value 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.
143 144 145 |
# File 'lib/models/attachment_item.rb', line 143 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.
151 152 153 |
# File 'lib/models/attachment_item.rb', line 151 def name=(value) @name = value end |
#odata_type ⇒ Object
Gets the @odata.type property value. The OdataType property
158 159 160 |
# File 'lib/models/attachment_item.rb', line 158 def odata_type return @odata_type end |
#odata_type=(value) ⇒ Object
Sets the @odata.type property value. The OdataType property
166 167 168 |
# File 'lib/models/attachment_item.rb', line 166 def odata_type=(value) @odata_type = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/models/attachment_item.rb', line 174 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? writer.write_enum_value("attachmentType", @attachment_type) writer.write_string_value("contentId", @content_id) writer.write_string_value("contentType", @content_type) writer.write_boolean_value("isInline", @is_inline) 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.
189 190 191 |
# File 'lib/models/attachment_item.rb', line 189 def size return @size end |
#size=(value) ⇒ Object
Sets the size property value. The length of the attachment in bytes. Required.
197 198 199 |
# File 'lib/models/attachment_item.rb', line 197 def size=(value) @size = value end |