Class: MicrosoftGraph::Models::TeamworkHostedContent
- Includes:
- MicrosoftKiotaAbstractions::Parsable
- Defined in:
- lib/models/teamwork_hosted_content.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_bytes ⇒ Object
Gets the contentBytes property value.
-
#content_bytes=(value) ⇒ Object
Sets the contentBytes 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 teamworkHostedContent and sets the default values.
-
#serialize(writer) ⇒ Object
Serializes information the current object.
Methods inherited from Entity
#additional_data, #additional_data=, #id, #id=, #odata_type, #odata_type=
Constructor Details
#initialize ⇒ Object
Instantiates a new teamworkHostedContent and sets the default values.
19 20 21 |
# File 'lib/models/teamwork_hosted_content.rb', line 19 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
57 58 59 60 61 62 63 64 65 66 67 68 |
# File 'lib/models/teamwork_hosted_content.rb', line 57 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.chatMessageHostedContent" return ChatMessageHostedContent.new end end return TeamworkHostedContent.new end |
Instance Method Details
#content_bytes ⇒ Object
Gets the contentBytes property value. Write only. Bytes for the hosted content (such as images).
26 27 28 |
# File 'lib/models/teamwork_hosted_content.rb', line 26 def content_bytes return @content_bytes end |
#content_bytes=(value) ⇒ Object
Sets the contentBytes property value. Write only. Bytes for the hosted content (such as images).
34 35 36 |
# File 'lib/models/teamwork_hosted_content.rb', line 34 def content_bytes=(value) @content_bytes = value end |
#content_type ⇒ Object
Gets the contentType property value. Write only. Content type. sicj as image/png, image/jpg.
41 42 43 |
# File 'lib/models/teamwork_hosted_content.rb', line 41 def content_type return @content_type end |
#content_type=(value) ⇒ Object
Sets the contentType property value. Write only. Content type. sicj as image/png, image/jpg.
49 50 51 |
# File 'lib/models/teamwork_hosted_content.rb', line 49 def content_type=(value) @content_type = value end |
#get_field_deserializers ⇒ Object
The deserialization information for the current model
73 74 75 76 77 78 |
# File 'lib/models/teamwork_hosted_content.rb', line 73 def get_field_deserializers() return super.merge({ "contentBytes" => lambda {|n| @content_bytes = n.get_object_value(lambda {|pn| Base64url.create_from_discriminator_value(pn) }) }, "contentType" => lambda {|n| @content_type = n.get_string_value() }, }) end |
#serialize(writer) ⇒ Object
Serializes information the current object
84 85 86 87 88 89 |
# File 'lib/models/teamwork_hosted_content.rb', line 84 def serialize(writer) raise StandardError, 'writer cannot be null' if writer.nil? super writer.write_object_value("contentBytes", @content_bytes) writer.write_string_value("contentType", @content_type) end |