Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GameProperty

Set of key-value pairs that contain information about a game session.

When included in a game session request, these properties communicate details to be used when setting up the new game session. For example, a game property might specify a game mode, level, or map. Game properties are passed to the game server process when initiating a new game session. For more information, see the Amazon GameLift Developer Guide's section on creating game sessions.

Hierarchy

Index

Constructors

constructor

  • Constructs a new message instance.

    Parameters

    Returns GameProperty

Properties

Readonly $type

$type: Type

Reference to the reflected type.

key

key: string

The game property identifier.

value

value: string

The game property value.

Static Readonly $type

$type: Type

Reference to the reflected type.

Methods

toJSON

  • toJSON(): {}
  • Converts this message to JSON.

    Returns {}

    JSON object

    • [k: string]: any

Static create

  • create<T>(this: Constructor<T>, properties?: {}): Message<T>
  • Creates a new message of this type using the specified properties.

    Type parameters

    Parameters

    • this: Constructor<T>
    • Optional properties: {}
      • [k: string]: any

    Returns Message<T>

    Message instance

Static decode

  • decode<T>(this: Constructor<T>, reader: Uint8Array | Reader): T
  • Decodes a message of this type.

    Type parameters

    Parameters

    • this: Constructor<T>
    • reader: Uint8Array | Reader

      Reader or buffer to decode

    Returns T

    Decoded message

Static decodeDelimited

  • decodeDelimited<T>(this: Constructor<T>, reader: Uint8Array | Reader): T
  • Decodes a message of this type preceeded by its length as a varint.

    Type parameters

    Parameters

    • this: Constructor<T>
    • reader: Uint8Array | Reader

      Reader or buffer to decode

    Returns T

    Decoded message

Static encode

  • encode<T>(this: Constructor<T>, message: T | {}, writer?: Writer): Writer
  • Encodes a message of this type.

    Type parameters

    Parameters

    • this: Constructor<T>
    • message: T | {}

      Message to encode

    • Optional writer: Writer

    Returns Writer

    Writer

Static encodeDelimited

  • encodeDelimited<T>(this: Constructor<T>, message: T | {}, writer?: Writer): Writer
  • Encodes a message of this type preceeded by its length as a varint.

    Type parameters

    Parameters

    • this: Constructor<T>
    • message: T | {}

      Message to encode

    • Optional writer: Writer

    Returns Writer

    Writer

Static fromObject

  • fromObject<T>(this: Constructor<T>, object: {}): T
  • Creates a new message of this type from a plain object. Also converts values to their respective internal types.

    Type parameters

    Parameters

    • this: Constructor<T>
    • object: {}

      Plain object

      • [k: string]: any

    Returns T

    Message instance

Static toObject

  • toObject<T>(this: Constructor<T>, message: T, options?: IConversionOptions): {}
  • Creates a plain object from a message of this type. Also converts values to other types if specified.

    Type parameters

    Parameters

    • this: Constructor<T>
    • message: T

      Message instance

    • Optional options: IConversionOptions

    Returns {}

    Plain object

    • [k: string]: any

Static verify

  • verify(message: {}): string
  • Verifies a message of this type.

    Parameters

    • message: {}

      Plain object to verify

      • [k: string]: any

    Returns string

    null if valid, otherwise the reason why it is not

Generated using TypeDoc