Class: TeamBattlesSdk::Generated::Models::ApiGamePlaylist

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/teambattles_sdk/generated/models/api_game_playlist.rb

Overview

Game-scoped playlist definition.

Defined Under Namespace

Classes: ApiGamePlaylistDescriptionKey, ApiGamePlaylistImage

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 api_game_playlist

Raises:

  • (StandardError)


47
48
49
50
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 47

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

Instance Method Details

#allowed_game_mode_idsObject

Gets the allowedGameModeIds property value. The allowedGameModeIds property

Returns:

  • a string



31
32
33
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 31

def allowed_game_mode_ids
    return @allowed_game_mode_ids
end

#allowed_game_mode_ids=(value) ⇒ Object

Sets the allowedGameModeIds property value. The allowedGameModeIds property

Parameters:

  • value

    Value to set for the allowedGameModeIds property.

Returns:

  • a void



39
40
41
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 39

def allowed_game_mode_ids=(value)
    @allowed_game_mode_ids = value
end

#description_keyObject

Gets the descriptionKey property value. The descriptionKey property

Returns:

  • a api_game_playlist_description_key



55
56
57
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 55

def description_key
    return @description_key
end

#description_key=(value) ⇒ Object

Sets the descriptionKey property value. The descriptionKey property

Parameters:

  • value

    Value to set for the descriptionKey property.

Returns:

  • a void



63
64
65
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 63

def description_key=(value)
    @description_key = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



70
71
72
73
74
75
76
77
78
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 70

def get_field_deserializers()
    return {
        "allowedGameModeIds" => lambda {|n| @allowed_game_mode_ids = n.get_collection_of_primitive_values(String) },
        "descriptionKey" => lambda {|n| @description_key = n.get_object_value(lambda {|pn| ApiGamePlaylist::ApiGamePlaylistDescriptionKey.create_from_discriminator_value(pn) }) },
        "id" => lambda {|n| @id = n.get_string_value() },
        "image" => lambda {|n| @image = n.get_object_value(lambda {|pn| ApiGamePlaylist::ApiGamePlaylistImage.create_from_discriminator_value(pn) }) },
        "nameKey" => lambda {|n| @name_key = n.get_string_value() },
    }
end

#idObject

Gets the id property value. The id property

Returns:

  • a string



83
84
85
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 83

def id
    return @id
end

#id=(value) ⇒ Object

Sets the id property value. The id property

Parameters:

  • value

    Value to set for the id property.

Returns:

  • a void



91
92
93
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 91

def id=(value)
    @id = value
end

#imageObject

Gets the image property value. The image property

Returns:

  • a api_game_playlist_image



98
99
100
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 98

def image
    return @image
end

#image=(value) ⇒ Object

Sets the image property value. The image property

Parameters:

  • value

    Value to set for the image property.

Returns:

  • a void



106
107
108
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 106

def image=(value)
    @image = value
end

#name_keyObject

Gets the nameKey property value. The nameKey property

Returns:

  • a string



113
114
115
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 113

def name_key
    return @name_key
end

#name_key=(value) ⇒ Object

Sets the nameKey property value. The nameKey property

Parameters:

  • value

    Value to set for the nameKey property.

Returns:

  • a void



121
122
123
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 121

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


129
130
131
132
133
134
135
136
# File 'lib/teambattles_sdk/generated/models/api_game_playlist.rb', line 129

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_collection_of_primitive_values("allowedGameModeIds", @allowed_game_mode_ids)
    writer.write_object_value("descriptionKey", @description_key)
    writer.write_string_value("id", @id)
    writer.write_object_value("image", @image)
    writer.write_string_value("nameKey", @name_key)
end