Class: Google::Apis::ChatV1::QuotedMessageMetadata

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb

Overview

Information about a message that another message quotes. When you create a message, you can quote messages within the same thread, or quote a root message to create a new root message. However, you can't quote a message reply from a different thread. When you update a message, you can't add or replace the quotedMessageMetadata field, but you can remove it. For example usage, see Quote another message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ QuotedMessageMetadata

Returns a new instance of QuotedMessageMetadata.



5826
5827
5828
# File 'lib/google/apis/chat_v1/classes.rb', line 5826

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#forwarded_metadataGoogle::Apis::ChatV1::ForwardedMetadata

Metadata about the source space from which a message was forwarded. Corresponds to the JSON property forwardedMetadata



5797
5798
5799
# File 'lib/google/apis/chat_v1/classes.rb', line 5797

def 
  @forwarded_metadata
end

#last_update_timeString

Required. The timestamp when the quoted message was created or when the quoted message was last updated. If the message was edited, use this field, last_update_time. If the message was never edited, use create_time. If last_update_time doesn't match the latest version of the quoted message, the request fails. Corresponds to the JSON property lastUpdateTime

Returns:

  • (String)


5806
5807
5808
# File 'lib/google/apis/chat_v1/classes.rb', line 5806

def last_update_time
  @last_update_time
end

#nameString

Required. Resource name of the message that is quoted. Format: spaces/space/ messages/message` Corresponds to the JSON propertyname`

Returns:

  • (String)


5812
5813
5814
# File 'lib/google/apis/chat_v1/classes.rb', line 5812

def name
  @name
end

#quote_typeString

Optional. Specifies the quote type. If not set, defaults to REPLY in the message read/write path for backward compatibility. Corresponds to the JSON property quoteType

Returns:

  • (String)


5818
5819
5820
# File 'lib/google/apis/chat_v1/classes.rb', line 5818

def quote_type
  @quote_type
end

#quoted_message_snapshotGoogle::Apis::ChatV1::QuotedMessageSnapshot

Provides a snapshot of the content of the quoted message at the time of quoting or forwarding Corresponds to the JSON property quotedMessageSnapshot



5824
5825
5826
# File 'lib/google/apis/chat_v1/classes.rb', line 5824

def quoted_message_snapshot
  @quoted_message_snapshot
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5831
5832
5833
5834
5835
5836
5837
# File 'lib/google/apis/chat_v1/classes.rb', line 5831

def update!(**args)
  @forwarded_metadata = args[:forwarded_metadata] if args.key?(:forwarded_metadata)
  @last_update_time = args[:last_update_time] if args.key?(:last_update_time)
  @name = args[:name] if args.key?(:name)
  @quote_type = args[:quote_type] if args.key?(:quote_type)
  @quoted_message_snapshot = args[:quoted_message_snapshot] if args.key?(:quoted_message_snapshot)
end