Class: MicrosoftGraph::Models::AttachmentBase
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/attachment_base.rb
Direct Known Subclasses
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_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 attachmentBase and sets the default values.
-
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value.
-
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value.
-
#name ⇒ Object
Gets the name property value.
-
#name=(value) ⇒ Object
Sets the name 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.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new attachmentBase and sets the default values.
26 27 28 |
# File 'lib/models/attachment_base.rb', line 26 def initialize() super end |
Class Method Details
.create_from_discriminator_value(parse_node) ⇒ Object
Creates a new instance of the appropriate class based on discriminator value
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/models/attachment_base.rb', line 49 def self.create_from_discriminator_value(parse_node) raise StandardError, 'parse_node cannot be null' if parse_node.nil? mapping_value_node = parse_node.get_child_node("@odata.type") unless mapping_value_node.nil? then mapping_value = mapping_value_node.get_string_value case mapping_value when "#microsoft.graph.taskFileAttachment" return TaskFileAttachment.new end end return AttachmentBase.new end |
Instance Method Details
#content_type ⇒ Object
Gets the contentType property value. The MIME type.
33 34 35 |
# File 'lib/models/attachment_base.rb', line 33 def content_type return @content_type end |
#content_type=(value) ⇒ Object
Sets the contentType property value. The MIME type.
41 42 43 |
# File 'lib/models/attachment_base.rb', line 41 def content_type=(value) @content_type = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
65 66 67 68 69 70 71 72 |
# File 'lib/models/attachment_base.rb', line 65 def get_field_deserializers() return super.merge({ "contentType" => lambda {|n| @content_type = n.get_string_value() }, "lastModifiedDateTime" => lambda {|n| @last_modified_date_time = n.get_date_time_value() }, "name" => lambda {|n| @name = n.get_string_value() }, "size" => lambda {|n| @size = n.get_number_value() }, }) end |
#last_modified_date_time ⇒ Object
Gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
77 78 79 |
# File 'lib/models/attachment_base.rb', line 77 def last_modified_date_time return @last_modified_date_time end |
#last_modified_date_time=(value) ⇒ Object
Sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z.
85 86 87 |
# File 'lib/models/attachment_base.rb', line 85 def last_modified_date_time=(value) @last_modified_date_time = value end |
#name ⇒ Object
Gets the name property value. The display name of the attachment. This does not need to be the actual file name.
92 93 94 |
# File 'lib/models/attachment_base.rb', line 92 def name return @name end |
#name=(value) ⇒ Object
Sets the name property value. The display name of the attachment. This does not need to be the actual file name.
100 101 102 |
# File 'lib/models/attachment_base.rb', line 100 def name=(value) @name = value end |
#serialize(writer) ⇒ Object
Serializes information the current object
108 109 110 111 112 113 114 115 |
# File 'lib/models/attachment_base.rb', line 108 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_string_value("contentType", @content_type) writer.write_date_time_value("lastModifiedDateTime", @last_modified_date_time) writer.write_string_value("name", @name) writer.write_number_value("size", @size) end |
#size ⇒ Object
Gets the size property value. The length of the attachment in bytes.
120 121 122 |
# File 'lib/models/attachment_base.rb', line 120 def size return @size end |
#size=(value) ⇒ Object
Sets the size property value. The length of the attachment in bytes.
128 129 130 |
# File 'lib/models/attachment_base.rb', line 128 def size=(value) @size = value end |