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
94
95
96
97
98
99
100
101
102
103
104
105
106
// 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 StartMatchmakingInput {
/// <p>A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.</p>
#[doc(hidden)]
pub ticket_id: std::option::Option<std::string::String>,
/// <p>Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same Region as this request. You can use either the configuration name or ARN value.</p>
#[doc(hidden)]
pub configuration_name: std::option::Option<std::string::String>,
/// <p>Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, <code>Player</code> objects contain the name of the team the player is assigned to.</p>
/// <p>You can include up to 10 <code>Players</code> in a <code>StartMatchmaking</code> request.</p>
#[doc(hidden)]
pub players: std::option::Option<std::vec::Vec<crate::types::Player>>,
}
impl StartMatchmakingInput {
/// <p>A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.</p>
pub fn ticket_id(&self) -> std::option::Option<&str> {
self.ticket_id.as_deref()
}
/// <p>Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same Region as this request. You can use either the configuration name or ARN value.</p>
pub fn configuration_name(&self) -> std::option::Option<&str> {
self.configuration_name.as_deref()
}
/// <p>Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, <code>Player</code> objects contain the name of the team the player is assigned to.</p>
/// <p>You can include up to 10 <code>Players</code> in a <code>StartMatchmaking</code> request.</p>
pub fn players(&self) -> std::option::Option<&[crate::types::Player]> {
self.players.as_deref()
}
}
impl StartMatchmakingInput {
/// Creates a new builder-style object to manufacture [`StartMatchmakingInput`](crate::operation::start_matchmaking::StartMatchmakingInput).
pub fn builder() -> crate::operation::start_matchmaking::builders::StartMatchmakingInputBuilder
{
crate::operation::start_matchmaking::builders::StartMatchmakingInputBuilder::default()
}
}
/// A builder for [`StartMatchmakingInput`](crate::operation::start_matchmaking::StartMatchmakingInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct StartMatchmakingInputBuilder {
pub(crate) ticket_id: std::option::Option<std::string::String>,
pub(crate) configuration_name: std::option::Option<std::string::String>,
pub(crate) players: std::option::Option<std::vec::Vec<crate::types::Player>>,
}
impl StartMatchmakingInputBuilder {
/// <p>A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.</p>
pub fn ticket_id(mut self, input: impl Into<std::string::String>) -> Self {
self.ticket_id = Some(input.into());
self
}
/// <p>A unique identifier for a matchmaking ticket. If no ticket ID is specified here, Amazon GameLift will generate one in the form of a UUID. Use this identifier to track the matchmaking ticket status and retrieve match results.</p>
pub fn set_ticket_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ticket_id = input;
self
}
/// <p>Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same Region as this request. You can use either the configuration name or ARN value.</p>
pub fn configuration_name(mut self, input: impl Into<std::string::String>) -> Self {
self.configuration_name = Some(input.into());
self
}
/// <p>Name of the matchmaking configuration to use for this request. Matchmaking configurations must exist in the same Region as this request. You can use either the configuration name or ARN value.</p>
pub fn set_configuration_name(
mut self,
input: std::option::Option<std::string::String>,
) -> Self {
self.configuration_name = input;
self
}
/// Appends an item to `players`.
///
/// To override the contents of this collection use [`set_players`](Self::set_players).
///
/// <p>Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, <code>Player</code> objects contain the name of the team the player is assigned to.</p>
/// <p>You can include up to 10 <code>Players</code> in a <code>StartMatchmaking</code> request.</p>
pub fn players(mut self, input: crate::types::Player) -> Self {
let mut v = self.players.unwrap_or_default();
v.push(input);
self.players = Some(v);
self
}
/// <p>Information on each player to be matched. This information must include a player ID, and may contain player attributes and latency data to be used in the matchmaking process. After a successful match, <code>Player</code> objects contain the name of the team the player is assigned to.</p>
/// <p>You can include up to 10 <code>Players</code> in a <code>StartMatchmaking</code> request.</p>
pub fn set_players(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Player>>,
) -> Self {
self.players = input;
self
}
/// Consumes the builder and constructs a [`StartMatchmakingInput`](crate::operation::start_matchmaking::StartMatchmakingInput).
pub fn build(
self,
) -> Result<
crate::operation::start_matchmaking::StartMatchmakingInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::start_matchmaking::StartMatchmakingInput {
ticket_id: self.ticket_id,
configuration_name: self.configuration_name,
players: self.players,
})
}
}