Class: TeamBattlesSdk::Generated::Game::Matches::MatchesPostResponse

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/game/matches/matches_post_response.rb

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 matches_post_response

Raises:

  • (StandardError)


45
46
47
48
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 45

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

Instance Method Details

#countObject

Gets the count property value. The count property

Returns:

  • a integer



29
30
31
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 29

def count
    return @count
end

#count=(value) ⇒ Object

Sets the count property value. The count property

Parameters:

  • value

    Value to set for the count property.

Returns:

  • a void



37
38
39
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 37

def count=(value)
    @count = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



53
54
55
56
57
58
59
60
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 53

def get_field_deserializers()
    return {
        "count" => lambda {|n| @count = n.get_number_value() },
        "matches" => lambda {|n| @matches = n.get_collection_of_object_values(lambda {|pn| TeamBattlesSdk::Generated::Models::GameMatch.create_from_discriminator_value(pn) }) },
        "pagination" => lambda {|n| @pagination = n.get_object_value(lambda {|pn| TeamBattlesSdk::Generated::Game::Matches::MatchesPostResponsePagination.create_from_discriminator_value(pn) }) },
        "timestamp" => lambda {|n| @timestamp = n.get_string_value() },
    }
end

#matchesObject

Gets the matches property value. The matches property

Returns:

  • a game_match



65
66
67
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 65

def matches
    return @matches
end

#matches=(value) ⇒ Object

Sets the matches property value. The matches property

Parameters:

  • value

    Value to set for the matches property.

Returns:

  • a void



73
74
75
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 73

def matches=(value)
    @matches = value
end

#paginationObject

Gets the pagination property value. The pagination property

Returns:

  • a matches_post_response_pagination



80
81
82
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 80

def pagination
    return @pagination
end

#pagination=(value) ⇒ Object

Sets the pagination property value. The pagination property

Parameters:

  • value

    Value to set for the pagination property.

Returns:

  • a void



88
89
90
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 88

def pagination=(value)
    @pagination = 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)


96
97
98
99
100
101
102
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 96

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_number_value("count", @count)
    writer.write_collection_of_object_values("matches", @matches)
    writer.write_object_value("pagination", @pagination)
    writer.write_string_value("timestamp", @timestamp)
end

#timestampObject

Gets the timestamp property value. The timestamp property

Returns:

  • a string



107
108
109
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 107

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



115
116
117
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response.rb', line 115

def timestamp=(value)
    @timestamp = value
end