1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct CreatePlayerSessionInput {
/// <p>A unique identifier for the game session to add a player to.</p>
#[doc(hidden)]
pub game_session_id: std::option::Option<std::string::String>,
/// <p>A unique identifier for a player. Player IDs are developer-defined.</p>
#[doc(hidden)]
pub player_id: std::option::Option<std::string::String>,
/// <p>Developer-defined information related to a player. GameLift does not use this data, so it can be formatted as needed for use in the game.</p>
#[doc(hidden)]
pub player_data: std::option::Option<std::string::String>,
}
impl CreatePlayerSessionInput {
/// <p>A unique identifier for the game session to add a player to.</p>
pub fn game_session_id(&self) -> std::option::Option<&str> {
self.game_session_id.as_deref()
}
/// <p>A unique identifier for a player. Player IDs are developer-defined.</p>
pub fn player_id(&self) -> std::option::Option<&str> {
self.player_id.as_deref()
}
/// <p>Developer-defined information related to a player. GameLift does not use this data, so it can be formatted as needed for use in the game.</p>
pub fn player_data(&self) -> std::option::Option<&str> {
self.player_data.as_deref()
}
}
impl CreatePlayerSessionInput {
/// Creates a new builder-style object to manufacture [`CreatePlayerSessionInput`](crate::operation::create_player_session::CreatePlayerSessionInput).
pub fn builder(
) -> crate::operation::create_player_session::builders::CreatePlayerSessionInputBuilder {
crate::operation::create_player_session::builders::CreatePlayerSessionInputBuilder::default(
)
}
}
/// A builder for [`CreatePlayerSessionInput`](crate::operation::create_player_session::CreatePlayerSessionInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct CreatePlayerSessionInputBuilder {
pub(crate) game_session_id: std::option::Option<std::string::String>,
pub(crate) player_id: std::option::Option<std::string::String>,
pub(crate) player_data: std::option::Option<std::string::String>,
}
impl CreatePlayerSessionInputBuilder {
/// <p>A unique identifier for the game session to add a player to.</p>
pub fn game_session_id(mut self, input: impl Into<std::string::String>) -> Self {
self.game_session_id = Some(input.into());
self
}
/// <p>A unique identifier for the game session to add a player to.</p>
pub fn set_game_session_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.game_session_id = input;
self
}
/// <p>A unique identifier for a player. Player IDs are developer-defined.</p>
pub fn player_id(mut self, input: impl Into<std::string::String>) -> Self {
self.player_id = Some(input.into());
self
}
/// <p>A unique identifier for a player. Player IDs are developer-defined.</p>
pub fn set_player_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.player_id = input;
self
}
/// <p>Developer-defined information related to a player. GameLift does not use this data, so it can be formatted as needed for use in the game.</p>
pub fn player_data(mut self, input: impl Into<std::string::String>) -> Self {
self.player_data = Some(input.into());
self
}
/// <p>Developer-defined information related to a player. GameLift does not use this data, so it can be formatted as needed for use in the game.</p>
pub fn set_player_data(mut self, input: std::option::Option<std::string::String>) -> Self {
self.player_data = input;
self
}
/// Consumes the builder and constructs a [`CreatePlayerSessionInput`](crate::operation::create_player_session::CreatePlayerSessionInput).
pub fn build(
self,
) -> Result<
crate::operation::create_player_session::CreatePlayerSessionInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(
crate::operation::create_player_session::CreatePlayerSessionInput {
game_session_id: self.game_session_id,
player_id: self.player_id,
player_data: self.player_data,
},
)
}
}