aws_sdk_gamelift/operation/describe_matchmaking/
_describe_matchmaking_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeMatchmakingInput {
6    /// <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values.</p>
7    pub ticket_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
8}
9impl DescribeMatchmakingInput {
10    /// <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values.</p>
11    ///
12    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.ticket_ids.is_none()`.
13    pub fn ticket_ids(&self) -> &[::std::string::String] {
14        self.ticket_ids.as_deref().unwrap_or_default()
15    }
16}
17impl DescribeMatchmakingInput {
18    /// Creates a new builder-style object to manufacture [`DescribeMatchmakingInput`](crate::operation::describe_matchmaking::DescribeMatchmakingInput).
19    pub fn builder() -> crate::operation::describe_matchmaking::builders::DescribeMatchmakingInputBuilder {
20        crate::operation::describe_matchmaking::builders::DescribeMatchmakingInputBuilder::default()
21    }
22}
23
24/// A builder for [`DescribeMatchmakingInput`](crate::operation::describe_matchmaking::DescribeMatchmakingInput).
25#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
26#[non_exhaustive]
27pub struct DescribeMatchmakingInputBuilder {
28    pub(crate) ticket_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
29}
30impl DescribeMatchmakingInputBuilder {
31    /// Appends an item to `ticket_ids`.
32    ///
33    /// To override the contents of this collection use [`set_ticket_ids`](Self::set_ticket_ids).
34    ///
35    /// <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values.</p>
36    pub fn ticket_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
37        let mut v = self.ticket_ids.unwrap_or_default();
38        v.push(input.into());
39        self.ticket_ids = ::std::option::Option::Some(v);
40        self
41    }
42    /// <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values.</p>
43    pub fn set_ticket_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
44        self.ticket_ids = input;
45        self
46    }
47    /// <p>A unique identifier for a matchmaking ticket. You can include up to 10 ID values.</p>
48    pub fn get_ticket_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
49        &self.ticket_ids
50    }
51    /// Consumes the builder and constructs a [`DescribeMatchmakingInput`](crate::operation::describe_matchmaking::DescribeMatchmakingInput).
52    pub fn build(
53        self,
54    ) -> ::std::result::Result<crate::operation::describe_matchmaking::DescribeMatchmakingInput, ::aws_smithy_types::error::operation::BuildError>
55    {
56        ::std::result::Result::Ok(crate::operation::describe_matchmaking::DescribeMatchmakingInput { ticket_ids: self.ticket_ids })
57    }
58}