Class: MicrosoftGraph::Models::FileAttachment
- Inherits:
-
Attachment
- Object
- Entity
- Attachment
- MicrosoftGraph::Models::FileAttachment
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/file_attachment.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
-
#content_bytes ⇒ Object
Gets the contentBytes property value.
-
#content_bytes=(value) ⇒ Object
Sets the contentBytes property value.
-
#content_id ⇒ Object
Gets the contentId property value.
-
#content_id=(value) ⇒ Object
Sets the contentId property value.
-
#content_location ⇒ Object
Gets the contentLocation property value.
-
#content_location=(value) ⇒ Object
Sets the contentLocation property value.
-
#get_field_deserializers ⇒ Object
The deserialization information for the current model.
-
#initialize ⇒ Object
constructor
Instantiates a new fileAttachment and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Attachment
#content_type, #content_type=, #is_inline, #is_inline=, #last_modified_date_time, #last_modified_date_time=, #name, #name=, #size, #size=
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new fileAttachment and sets the default values.
22 23 24 25 |
# File 'lib/models/file_attachment.rb', line 22 def initialize() super @odata_type = "#microsoft.graph.fileAttachment" end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
76 77 78 79 |
# File 'lib/models/file_attachment.rb', line 76 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? return FileAttachment.new end |
Instance Method Details
#content_bytes ⇒ Object
Gets the contentBytes property value. The base64-encoded contents of the file.
30 31 32 |
# File 'lib/models/file_attachment.rb', line 30 def content_bytes return @content_bytes end |
#content_bytes=(value) ⇒ Object
Sets the contentBytes property value. The base64-encoded contents of the file.
38 39 40 |
# File 'lib/models/file_attachment.rb', line 38 def content_bytes=(value) @content_bytes = value end |
#content_id ⇒ Object
Gets the contentId property value. The ID of the attachment in the Exchange store.
45 46 47 |
# File 'lib/models/file_attachment.rb', line 45 def content_id return @content_id end |
#content_id=(value) ⇒ Object
Sets the contentId property value. The ID of the attachment in the Exchange store.
53 54 55 |
# File 'lib/models/file_attachment.rb', line 53 def content_id=(value) @content_id = value end |
#content_location ⇒ Object
Gets the contentLocation property value. Do not use this property as it is not supported.
60 61 62 |
# File 'lib/models/file_attachment.rb', line 60 def content_location return @content_location end |
#content_location=(value) ⇒ Object
Sets the contentLocation property value. Do not use this property as it is not supported.
68 69 70 |
# File 'lib/models/file_attachment.rb', line 68 def content_location=(value) @content_location = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
84 85 86 87 88 89 90 |
# File 'lib/models/file_attachment.rb', line 84 def get_field_deserializers() return super.merge({ "contentBytes" => lambda {|n| @content_bytes = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) }, "contentId" => lambda {|n| @content_id = n.get_string_value() }, "contentLocation" => lambda {|n| @content_location = n.get_string_value() }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
96 97 98 99 100 101 102 |
# File 'lib/models/file_attachment.rb', line 96 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("contentBytes", @content_bytes) writer.write_string_value("contentId", @content_id) writer.write_string_value("contentLocation", @content_location) end |