Struct aws_sdk_gamelift::types::GameSessionPlacement

source ·
#[non_exhaustive]
pub struct GameSessionPlacement {
Show 18 fields pub placement_id: Option<String>, pub game_session_queue_name: Option<String>, pub status: Option<GameSessionPlacementState>, pub game_properties: Option<Vec<GameProperty>>, pub maximum_player_session_count: Option<i32>, pub game_session_name: Option<String>, pub game_session_id: Option<String>, pub game_session_arn: Option<String>, pub game_session_region: Option<String>, pub player_latencies: Option<Vec<PlayerLatency>>, pub start_time: Option<DateTime>, pub end_time: Option<DateTime>, pub ip_address: Option<String>, pub dns_name: Option<String>, pub port: Option<i32>, pub placed_player_sessions: Option<Vec<PlacedPlayerSession>>, pub game_session_data: Option<String>, pub matchmaker_data: Option<String>,
}
Expand description

Represents a potential game session placement, including the full details of the original placement request and the current status.

If the game session placement status is PENDING, the properties for game session ID/ARN, region, IP address/DNS, and port aren't final. A game session is not active and ready to accept players until placement status reaches FULFILLED. When the placement is in PENDING status, Amazon GameLift may attempt to place a game session multiple times before succeeding. With each attempt it creates a GameSession object and updates this placement object with the new game session properties..

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§placement_id: Option<String>

A unique identifier for a game session placement.

§game_session_queue_name: Option<String>

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

§status: Option<GameSessionPlacementState>

Current status of the game session placement request.

  • PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.

  • FULFILLED -- A new game session has been successfully placed. Game session properties are now final.

  • CANCELLED -- The placement request was canceled.

  • TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.

  • FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.

§game_properties: Option<Vec<GameProperty>>

A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.

§maximum_player_session_count: Option<i32>

The maximum number of players that can be connected simultaneously to the game session.

§game_session_name: Option<String>

A descriptive label that is associated with a game session. Session names do not need to be unique.

§game_session_id: Option<String>

A unique identifier for the game session. This value isn't final until placement status is FULFILLED.

§game_session_arn: Option<String>

Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED.

§game_session_region: Option<String>

Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED.

§player_latencies: Option<Vec<PlayerLatency>>

A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.

§start_time: Option<DateTime>

Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

§end_time: Option<DateTime>

Time stamp indicating when this request was completed, canceled, or timed out.

§ip_address: Option<String>

The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.

§dns_name: Option<String>

The DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

§port: Option<i32>

The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.

§placed_player_sessions: Option<Vec<PlacedPlayerSession>>

A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID, provided in the placement request, and a corresponding player session ID.

§game_session_data: Option<String>

A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

§matchmaker_data: Option<String>

Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.

Implementations§

source§

impl GameSessionPlacement

source

pub fn placement_id(&self) -> Option<&str>

A unique identifier for a game session placement.

source

pub fn game_session_queue_name(&self) -> Option<&str>

A descriptive label that is associated with game session queue. Queue names must be unique within each Region.

source

pub fn status(&self) -> Option<&GameSessionPlacementState>

Current status of the game session placement request.

  • PENDING -- The placement request is in the queue waiting to be processed. Game session properties are not yet final.

  • FULFILLED -- A new game session has been successfully placed. Game session properties are now final.

  • CANCELLED -- The placement request was canceled.

  • TIMED_OUT -- A new game session was not successfully created before the time limit expired. You can resubmit the placement request as needed.

  • FAILED -- Amazon GameLift is not able to complete the process of placing the game session. Common reasons are the game session terminated before the placement process was completed, or an unexpected internal error.

source

pub fn game_properties(&self) -> &[GameProperty]

A set of key-value pairs that can store custom data in a game session. For example: {"Key": "difficulty", "Value": "novice"}.

If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .game_properties.is_none().

source

pub fn maximum_player_session_count(&self) -> Option<i32>

The maximum number of players that can be connected simultaneously to the game session.

source

pub fn game_session_name(&self) -> Option<&str>

A descriptive label that is associated with a game session. Session names do not need to be unique.

source

pub fn game_session_id(&self) -> Option<&str>

A unique identifier for the game session. This value isn't final until placement status is FULFILLED.

source

pub fn game_session_arn(&self) -> Option<&str>

Identifier for the game session created by this placement request. This identifier is unique across all Regions. This value isn't final until placement status is FULFILLED.

source

pub fn game_session_region(&self) -> Option<&str>

Name of the Region where the game session created by this placement request is running. This value isn't final until placement status is FULFILLED.

source

pub fn player_latencies(&self) -> &[PlayerLatency]

A set of values, expressed in milliseconds, that indicates the amount of latency that a player experiences when connected to Amazon Web Services Regions.

If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .player_latencies.is_none().

source

pub fn start_time(&self) -> Option<&DateTime>

Time stamp indicating when this request was placed in the queue. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").

source

pub fn end_time(&self) -> Option<&DateTime>

Time stamp indicating when this request was completed, canceled, or timed out.

source

pub fn ip_address(&self) -> Option<&str>

The IP address of the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.

source

pub fn dns_name(&self) -> Option<&str>

The DNS identifier assigned to the instance that is running the game session. Values have the following format:

When connecting to a game session that is running on a TLS-enabled fleet, you must use the DNS name, not the IP address.

source

pub fn port(&self) -> Option<i32>

The port number for the game session. To connect to a Amazon GameLift game server, an app needs both the IP address and port number. This value isn't final until placement status is FULFILLED.

source

pub fn placed_player_sessions(&self) -> &[PlacedPlayerSession]

A collection of information on player sessions created in response to the game session placement request. These player sessions are created only after a new game session is successfully placed (placement status is FULFILLED). This information includes the player ID, provided in the placement request, and a corresponding player session ID.

If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .placed_player_sessions.is_none().

source

pub fn game_session_data(&self) -> Option<&str>

A set of custom game session properties, formatted as a single string value. This data is passed to a game server process in the GameSession object with a request to start a new game session (see Start a Game Session).

source

pub fn matchmaker_data(&self) -> Option<&str>

Information on the matchmaking process for this game. Data is in JSON syntax, formatted as a string. It identifies the matchmaking configuration used to create the match, and contains data on all players assigned to the match, including player attributes and team assignments. For more details on matchmaker data, see Match Data.

source§

impl GameSessionPlacement

source

pub fn builder() -> GameSessionPlacementBuilder

Creates a new builder-style object to manufacture GameSessionPlacement.

Trait Implementations§

source§

impl Clone for GameSessionPlacement

source§

fn clone(&self) -> GameSessionPlacement

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for GameSessionPlacement

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl PartialEq for GameSessionPlacement

source§

fn eq(&self, other: &GameSessionPlacement) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for GameSessionPlacement

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<Unshared, Shared> IntoShared<Shared> for Unshared
where Shared: FromUnshared<Unshared>,

source§

fn into_shared(self) -> Shared

Creates a shared type from an unshared type.
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more