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
// 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 AcceptMatchInput {
/// <p>A unique identifier for a matchmaking ticket. The ticket must be in status <code>REQUIRES_ACCEPTANCE</code>; otherwise this request will fail.</p>
#[doc(hidden)]
pub ticket_id: std::option::Option<std::string::String>,
/// <p>A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.</p>
#[doc(hidden)]
pub player_ids: std::option::Option<std::vec::Vec<std::string::String>>,
/// <p>Player response to the proposed match.</p>
#[doc(hidden)]
pub acceptance_type: std::option::Option<crate::types::AcceptanceType>,
}
impl AcceptMatchInput {
/// <p>A unique identifier for a matchmaking ticket. The ticket must be in status <code>REQUIRES_ACCEPTANCE</code>; otherwise this request will fail.</p>
pub fn ticket_id(&self) -> std::option::Option<&str> {
self.ticket_id.as_deref()
}
/// <p>A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.</p>
pub fn player_ids(&self) -> std::option::Option<&[std::string::String]> {
self.player_ids.as_deref()
}
/// <p>Player response to the proposed match.</p>
pub fn acceptance_type(&self) -> std::option::Option<&crate::types::AcceptanceType> {
self.acceptance_type.as_ref()
}
}
impl AcceptMatchInput {
/// Creates a new builder-style object to manufacture [`AcceptMatchInput`](crate::operation::accept_match::AcceptMatchInput).
pub fn builder() -> crate::operation::accept_match::builders::AcceptMatchInputBuilder {
crate::operation::accept_match::builders::AcceptMatchInputBuilder::default()
}
}
/// A builder for [`AcceptMatchInput`](crate::operation::accept_match::AcceptMatchInput).
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct AcceptMatchInputBuilder {
pub(crate) ticket_id: std::option::Option<std::string::String>,
pub(crate) player_ids: std::option::Option<std::vec::Vec<std::string::String>>,
pub(crate) acceptance_type: std::option::Option<crate::types::AcceptanceType>,
}
impl AcceptMatchInputBuilder {
/// <p>A unique identifier for a matchmaking ticket. The ticket must be in status <code>REQUIRES_ACCEPTANCE</code>; otherwise this request will fail.</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. The ticket must be in status <code>REQUIRES_ACCEPTANCE</code>; otherwise this request will fail.</p>
pub fn set_ticket_id(mut self, input: std::option::Option<std::string::String>) -> Self {
self.ticket_id = input;
self
}
/// Appends an item to `player_ids`.
///
/// To override the contents of this collection use [`set_player_ids`](Self::set_player_ids).
///
/// <p>A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.</p>
pub fn player_ids(mut self, input: impl Into<std::string::String>) -> Self {
let mut v = self.player_ids.unwrap_or_default();
v.push(input.into());
self.player_ids = Some(v);
self
}
/// <p>A unique identifier for a player delivering the response. This parameter can include one or multiple player IDs.</p>
pub fn set_player_ids(
mut self,
input: std::option::Option<std::vec::Vec<std::string::String>>,
) -> Self {
self.player_ids = input;
self
}
/// <p>Player response to the proposed match.</p>
pub fn acceptance_type(mut self, input: crate::types::AcceptanceType) -> Self {
self.acceptance_type = Some(input);
self
}
/// <p>Player response to the proposed match.</p>
pub fn set_acceptance_type(
mut self,
input: std::option::Option<crate::types::AcceptanceType>,
) -> Self {
self.acceptance_type = input;
self
}
/// Consumes the builder and constructs a [`AcceptMatchInput`](crate::operation::accept_match::AcceptMatchInput).
pub fn build(
self,
) -> Result<
crate::operation::accept_match::AcceptMatchInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::accept_match::AcceptMatchInput {
ticket_id: self.ticket_id,
player_ids: self.player_ids,
acceptance_type: self.acceptance_type,
})
}
}