#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct AcceptMatchInput {
pub ticket_id: ::std::option::Option<::std::string::String>,
pub player_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub acceptance_type: ::std::option::Option<crate::types::AcceptanceType>,
}
impl AcceptMatchInput {
pub fn ticket_id(&self) -> ::std::option::Option<&str> {
self.ticket_id.as_deref()
}
pub fn player_ids(&self) -> &[::std::string::String] {
self.player_ids.as_deref().unwrap_or_default()
}
pub fn acceptance_type(&self) -> ::std::option::Option<&crate::types::AcceptanceType> {
self.acceptance_type.as_ref()
}
}
impl ::std::fmt::Debug for AcceptMatchInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("AcceptMatchInput");
formatter.field("ticket_id", &self.ticket_id);
formatter.field("player_ids", &"*** Sensitive Data Redacted ***");
formatter.field("acceptance_type", &self.acceptance_type);
formatter.finish()
}
}
impl AcceptMatchInput {
pub fn builder() -> crate::operation::accept_match::builders::AcceptMatchInputBuilder {
crate::operation::accept_match::builders::AcceptMatchInputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
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 {
pub fn ticket_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.ticket_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_ticket_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.ticket_id = input;
self
}
pub fn get_ticket_id(&self) -> &::std::option::Option<::std::string::String> {
&self.ticket_id
}
pub fn player_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.player_ids.unwrap_or_default();
v.push(input.into());
self.player_ids = ::std::option::Option::Some(v);
self
}
pub fn set_player_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.player_ids = input;
self
}
pub fn get_player_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.player_ids
}
pub fn acceptance_type(mut self, input: crate::types::AcceptanceType) -> Self {
self.acceptance_type = ::std::option::Option::Some(input);
self
}
pub fn set_acceptance_type(mut self, input: ::std::option::Option<crate::types::AcceptanceType>) -> Self {
self.acceptance_type = input;
self
}
pub fn get_acceptance_type(&self) -> &::std::option::Option<crate::types::AcceptanceType> {
&self.acceptance_type
}
pub fn build(self) -> ::std::result::Result<crate::operation::accept_match::AcceptMatchInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::accept_match::AcceptMatchInput {
ticket_id: self.ticket_id,
player_ids: self.player_ids,
acceptance_type: self.acceptance_type,
})
}
}
impl ::std::fmt::Debug for AcceptMatchInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("AcceptMatchInputBuilder");
formatter.field("ticket_id", &self.ticket_id);
formatter.field("player_ids", &"*** Sensitive Data Redacted ***");
formatter.field("acceptance_type", &self.acceptance_type);
formatter.finish()
}
}