aws_sdk_gameliftstreams/operation/associate_applications/
_associate_applications_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 AssociateApplicationsInput {
6    /// <p>A stream group to associate to the applications.</p>
7    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
8    pub identifier: ::std::option::Option<::std::string::String>,
9    /// <p>A set of applications to associate with the stream group.</p>
10    /// <p>This value is a set of either <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARN)</a> or IDs that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
11    pub application_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12}
13impl AssociateApplicationsInput {
14    /// <p>A stream group to associate to the applications.</p>
15    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
16    pub fn identifier(&self) -> ::std::option::Option<&str> {
17        self.identifier.as_deref()
18    }
19    /// <p>A set of applications to associate with the stream group.</p>
20    /// <p>This value is a set of either <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARN)</a> or IDs that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.application_identifiers.is_none()`.
23    pub fn application_identifiers(&self) -> &[::std::string::String] {
24        self.application_identifiers.as_deref().unwrap_or_default()
25    }
26}
27impl AssociateApplicationsInput {
28    /// Creates a new builder-style object to manufacture [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
29    pub fn builder() -> crate::operation::associate_applications::builders::AssociateApplicationsInputBuilder {
30        crate::operation::associate_applications::builders::AssociateApplicationsInputBuilder::default()
31    }
32}
33
34/// A builder for [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct AssociateApplicationsInputBuilder {
38    pub(crate) identifier: ::std::option::Option<::std::string::String>,
39    pub(crate) application_identifiers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
40}
41impl AssociateApplicationsInputBuilder {
42    /// <p>A stream group to associate to the applications.</p>
43    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
44    /// This field is required.
45    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.identifier = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>A stream group to associate to the applications.</p>
50    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
51    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.identifier = input;
53        self
54    }
55    /// <p>A stream group to associate to the applications.</p>
56    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> or ID that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>. Example ID: <code>sg-1AB2C3De4</code>.</p>
57    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
58        &self.identifier
59    }
60    /// Appends an item to `application_identifiers`.
61    ///
62    /// To override the contents of this collection use [`set_application_identifiers`](Self::set_application_identifiers).
63    ///
64    /// <p>A set of applications to associate with the stream group.</p>
65    /// <p>This value is a set of either <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARN)</a> or IDs that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
66    pub fn application_identifiers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        let mut v = self.application_identifiers.unwrap_or_default();
68        v.push(input.into());
69        self.application_identifiers = ::std::option::Option::Some(v);
70        self
71    }
72    /// <p>A set of applications to associate with the stream group.</p>
73    /// <p>This value is a set of either <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARN)</a> or IDs that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
74    pub fn set_application_identifiers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
75        self.application_identifiers = input;
76        self
77    }
78    /// <p>A set of applications to associate with the stream group.</p>
79    /// <p>This value is a set of either <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARN)</a> or IDs that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
80    pub fn get_application_identifiers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
81        &self.application_identifiers
82    }
83    /// Consumes the builder and constructs a [`AssociateApplicationsInput`](crate::operation::associate_applications::AssociateApplicationsInput).
84    pub fn build(
85        self,
86    ) -> ::std::result::Result<crate::operation::associate_applications::AssociateApplicationsInput, ::aws_smithy_types::error::operation::BuildError>
87    {
88        ::std::result::Result::Ok(crate::operation::associate_applications::AssociateApplicationsInput {
89            identifier: self.identifier,
90            application_identifiers: self.application_identifiers,
91        })
92    }
93}