Class: TeamBattlesSdk::Generated::Matches::Item::Chat::ChatGetResponse

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb

Defined Under Namespace

Classes: ChatGetResponseNextCursor

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a chat_get_response

Raises:

  • (StandardError)


32
33
34
35
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 32

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return ChatGetResponse.new
end

Instance Method Details

#dataObject

Gets the data property value. The data property

Returns:

  • a chat_message



40
41
42
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 40

def data
    return @data
end

#data=(value) ⇒ Object

Sets the data property value. The data property

Parameters:

  • value

    Value to set for the data property.

Returns:

  • a void



48
49
50
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 48

def data=(value)
    @data = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



55
56
57
58
59
60
61
62
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 55

def get_field_deserializers()
    return {
        "data" => lambda {|n| @data = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::ChatMessage.create_from_discriminator_value(pn) }) },
        "hasMore" => lambda {|n| @has_more = n.get_boolean_value() },
        "nextCursor" => lambda {|n| @next_cursor = n.get_object_value(lambda {|pn| ChatGetResponse::ChatGetResponseNextCursor.create_from_discriminator_value(pn) }) },
        "timestamp" => lambda {|n| @timestamp = n.get_string_value() },
    }
end

#has_moreObject

Gets the hasMore property value. The hasMore property

Returns:

  • a boolean



67
68
69
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 67

def has_more
    return @has_more
end

#has_more=(value) ⇒ Object

Sets the hasMore property value. The hasMore property

Parameters:

  • value

    Value to set for the hasMore property.

Returns:

  • a void



75
76
77
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 75

def has_more=(value)
    @has_more = value
end

#next_cursorObject

Gets the nextCursor property value. The nextCursor property

Returns:

  • a chat_get_response_next_cursor



82
83
84
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 82

def next_cursor
    return @next_cursor
end

#next_cursor=(value) ⇒ Object

Sets the nextCursor property value. The nextCursor property

Parameters:

  • value

    Value to set for the nextCursor property.

Returns:

  • a void



90
91
92
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 90

def next_cursor=(value)
    @next_cursor = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


98
99
100
101
102
103
104
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 98

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_object_values("data", @data)
    writer.write_boolean_value("hasMore", @has_more)
    writer.write_object_value("nextCursor", @next_cursor)
    writer.write_string_value("timestamp", @timestamp)
end

#timestampObject

Gets the timestamp property value. The timestamp property

Returns:

  • a string



109
110
111
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 109

def timestamp
    return @timestamp
end

#timestamp=(value) ⇒ Object

Sets the timestamp property value. The timestamp property

Parameters:

  • value

    Value to set for the timestamp property.

Returns:

  • a void



117
118
119
# File 'lib/teambattles_sdk/generated/matches/item/chat/chat_get_response.rb', line 117

def timestamp=(value)
    @timestamp = value
end