Class: Google::Apis::Messages::MessageObject
- Inherits:
-
Object
- Object
- Google::Apis::Messages::MessageObject
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/messages/classes.rb,
lib/google/apis/messages/representations.rb,
lib/google/apis/messages/representations.rb
Defined Under Namespace
Classes: Representation
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#notification ⇒ Object
Returns the value of attribute notification.
-
#topic ⇒ Object
Returns the value of attribute topic.
Instance Method Summary collapse
-
#initialize(**args) ⇒ MessageObject
constructor
A new instance of MessageObject.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ MessageObject
Returns a new instance of MessageObject.
38 39 40 |
# File 'lib/google/apis/messages/classes.rb', line 38 def initialize(**args) update!(**args) end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
36 37 38 |
# File 'lib/google/apis/messages/classes.rb', line 36 def data @data end |
#notification ⇒ Object
Returns the value of attribute notification.
35 36 37 |
# File 'lib/google/apis/messages/classes.rb', line 35 def notification @notification end |
#topic ⇒ Object
Returns the value of attribute topic.
34 35 36 |
# File 'lib/google/apis/messages/classes.rb', line 34 def topic @topic end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
43 44 45 46 47 48 49 50 51 52 53 54 |
# File 'lib/google/apis/messages/classes.rb', line 43 def update!(**args) @topic = args[:topic] if args.key?(:topic) @notification = args[:notification] if args.key?(:notification) if args.key?(:data) && args[:data].is_a?(Hash) data = {} args[:data].each do |key, value| data[key.to_s] = value.to_s end @data = data end end |