Class: TeamBattlesSdk::Generated::Game::Matches::MatchesPostResponsePagination

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

Defined Under Namespace

Classes: MatchesPostResponsePaginationCursor

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_pagination

Raises:

  • (StandardError)


23
24
25
26
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 23

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

Instance Method Details

#cursorObject

Gets the cursor property value. The cursor property

Returns:

  • a matches_post_response_pagination_cursor



31
32
33
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 31

def cursor
    return @cursor
end

#cursor=(value) ⇒ Object

Sets the cursor property value. The cursor property

Parameters:

  • value

    Value to set for the cursor property.

Returns:

  • a void



39
40
41
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 39

def cursor=(value)
    @cursor = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



46
47
48
49
50
51
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 46

def get_field_deserializers()
    return {
        "cursor" => lambda {|n| @cursor = n.get_object_value(lambda {|pn| MatchesPostResponsePagination::MatchesPostResponsePaginationCursor.create_from_discriminator_value(pn) }) },
        "hasMore" => lambda {|n| @has_more = n.get_boolean_value() },
    }
end

#has_moreObject

Gets the hasMore property value. The hasMore property

Returns:

  • a boolean



56
57
58
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 56

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



64
65
66
# File 'lib/teambattles_sdk/generated/game/matches/matches_post_response_pagination.rb', line 64

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


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

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("cursor", @cursor)
    writer.write_boolean_value("hasMore", @has_more)
end