aws_sdk_gameliftstreams/operation/associate_applications/
_associate_applications_output.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 AssociateApplicationsOutput {
6    /// <p>A stream group that is associated 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> that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>.</p>
8    pub arn: ::std::option::Option<::std::string::String>,
9    /// <p>A set of applications that are associated to the stream group.</p>
10    /// <p>This value is a set of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a> that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>.</p>
11    pub application_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    _request_id: Option<String>,
13}
14impl AssociateApplicationsOutput {
15    /// <p>A stream group that is associated to the applications.</p>
16    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>.</p>
17    pub fn arn(&self) -> ::std::option::Option<&str> {
18        self.arn.as_deref()
19    }
20    /// <p>A set of applications that are associated to the stream group.</p>
21    /// <p>This value is a set of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a> that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>.</p>
22    ///
23    /// 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_arns.is_none()`.
24    pub fn application_arns(&self) -> &[::std::string::String] {
25        self.application_arns.as_deref().unwrap_or_default()
26    }
27}
28impl ::aws_types::request_id::RequestId for AssociateApplicationsOutput {
29    fn request_id(&self) -> Option<&str> {
30        self._request_id.as_deref()
31    }
32}
33impl AssociateApplicationsOutput {
34    /// Creates a new builder-style object to manufacture [`AssociateApplicationsOutput`](crate::operation::associate_applications::AssociateApplicationsOutput).
35    pub fn builder() -> crate::operation::associate_applications::builders::AssociateApplicationsOutputBuilder {
36        crate::operation::associate_applications::builders::AssociateApplicationsOutputBuilder::default()
37    }
38}
39
40/// A builder for [`AssociateApplicationsOutput`](crate::operation::associate_applications::AssociateApplicationsOutput).
41#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
42#[non_exhaustive]
43pub struct AssociateApplicationsOutputBuilder {
44    pub(crate) arn: ::std::option::Option<::std::string::String>,
45    pub(crate) application_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
46    _request_id: Option<String>,
47}
48impl AssociateApplicationsOutputBuilder {
49    /// <p>A stream group that is associated 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> that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>.</p>
51    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
52        self.arn = ::std::option::Option::Some(input.into());
53        self
54    }
55    /// <p>A stream group that is associated 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> that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>.</p>
57    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
58        self.arn = input;
59        self
60    }
61    /// <p>A stream group that is associated to the applications.</p>
62    /// <p>This value is an <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Name (ARN)</a> that uniquely identifies the stream group resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:streamgroup/sg-1AB2C3De4</code>.</p>
63    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.arn
65    }
66    /// Appends an item to `application_arns`.
67    ///
68    /// To override the contents of this collection use [`set_application_arns`](Self::set_application_arns).
69    ///
70    /// <p>A set of applications that are associated to the stream group.</p>
71    /// <p>This value is a set of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a> that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>.</p>
72    pub fn application_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        let mut v = self.application_arns.unwrap_or_default();
74        v.push(input.into());
75        self.application_arns = ::std::option::Option::Some(v);
76        self
77    }
78    /// <p>A set of applications that are associated to the stream group.</p>
79    /// <p>This value is a set of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a> that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>.</p>
80    pub fn set_application_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
81        self.application_arns = input;
82        self
83    }
84    /// <p>A set of applications that are associated to the stream group.</p>
85    /// <p>This value is a set of <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html">Amazon Resource Names (ARNs)</a> that uniquely identify application resources. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>.</p>
86    pub fn get_application_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
87        &self.application_arns
88    }
89    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
90        self._request_id = Some(request_id.into());
91        self
92    }
93
94    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
95        self._request_id = request_id;
96        self
97    }
98    /// Consumes the builder and constructs a [`AssociateApplicationsOutput`](crate::operation::associate_applications::AssociateApplicationsOutput).
99    pub fn build(self) -> crate::operation::associate_applications::AssociateApplicationsOutput {
100        crate::operation::associate_applications::AssociateApplicationsOutput {
101            arn: self.arn,
102            application_arns: self.application_arns,
103            _request_id: self._request_id,
104        }
105    }
106}