aws_sdk_gameliftstreams/operation/update_application/
_update_application_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 UpdateApplicationInput {
6    /// <p>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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
7    pub identifier: ::std::option::Option<::std::string::String>,
8    /// <p>A human-readable label for the application.</p>
9    pub description: ::std::option::Option<::std::string::String>,
10    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
11    pub application_log_paths: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
12    /// <p>An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more <code>ApplicationLogPaths</code>.</p><note>
13    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
14    /// </note>
15    pub application_log_output_uri: ::std::option::Option<::std::string::String>,
16}
17impl UpdateApplicationInput {
18    /// <p>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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
19    pub fn identifier(&self) -> ::std::option::Option<&str> {
20        self.identifier.as_deref()
21    }
22    /// <p>A human-readable label for the application.</p>
23    pub fn description(&self) -> ::std::option::Option<&str> {
24        self.description.as_deref()
25    }
26    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
27    ///
28    /// 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_log_paths.is_none()`.
29    pub fn application_log_paths(&self) -> &[::std::string::String] {
30        self.application_log_paths.as_deref().unwrap_or_default()
31    }
32    /// <p>An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more <code>ApplicationLogPaths</code>.</p><note>
33    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
34    /// </note>
35    pub fn application_log_output_uri(&self) -> ::std::option::Option<&str> {
36        self.application_log_output_uri.as_deref()
37    }
38}
39impl UpdateApplicationInput {
40    /// Creates a new builder-style object to manufacture [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
41    pub fn builder() -> crate::operation::update_application::builders::UpdateApplicationInputBuilder {
42        crate::operation::update_application::builders::UpdateApplicationInputBuilder::default()
43    }
44}
45
46/// A builder for [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
47#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
48#[non_exhaustive]
49pub struct UpdateApplicationInputBuilder {
50    pub(crate) identifier: ::std::option::Option<::std::string::String>,
51    pub(crate) description: ::std::option::Option<::std::string::String>,
52    pub(crate) application_log_paths: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
53    pub(crate) application_log_output_uri: ::std::option::Option<::std::string::String>,
54}
55impl UpdateApplicationInputBuilder {
56    /// <p>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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
57    /// This field is required.
58    pub fn identifier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59        self.identifier = ::std::option::Option::Some(input.into());
60        self
61    }
62    /// <p>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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
63    pub fn set_identifier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
64        self.identifier = input;
65        self
66    }
67    /// <p>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 application resource. Example ARN: <code>arn:aws:gameliftstreams:us-west-2:111122223333:application/a-9ZY8X7Wv6</code>. Example ID: <code>a-9ZY8X7Wv6</code>.</p>
68    pub fn get_identifier(&self) -> &::std::option::Option<::std::string::String> {
69        &self.identifier
70    }
71    /// <p>A human-readable label for the application.</p>
72    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
73        self.description = ::std::option::Option::Some(input.into());
74        self
75    }
76    /// <p>A human-readable label for the application.</p>
77    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
78        self.description = input;
79        self
80    }
81    /// <p>A human-readable label for the application.</p>
82    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
83        &self.description
84    }
85    /// Appends an item to `application_log_paths`.
86    ///
87    /// To override the contents of this collection use [`set_application_log_paths`](Self::set_application_log_paths).
88    ///
89    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
90    pub fn application_log_paths(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91        let mut v = self.application_log_paths.unwrap_or_default();
92        v.push(input.into());
93        self.application_log_paths = ::std::option::Option::Some(v);
94        self
95    }
96    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
97    pub fn set_application_log_paths(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
98        self.application_log_paths = input;
99        self
100    }
101    /// <p>Locations of log files that your content generates during a stream session. Enter path values that are relative to the <code>ApplicationSourceUri</code> location. You can specify up to 10 log paths. Amazon GameLift Streams uploads designated log files to the Amazon S3 bucket that you specify in <code>ApplicationLogOutputUri</code> at the end of a stream session. To retrieve stored log files, call <a href="https://docs.aws.amazon.com/gameliftstreams/latest/apireference/API_GetStreamSession.html">GetStreamSession</a> and get the <code>LogFileLocationUri</code>.</p>
102    pub fn get_application_log_paths(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
103        &self.application_log_paths
104    }
105    /// <p>An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more <code>ApplicationLogPaths</code>.</p><note>
106    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
107    /// </note>
108    pub fn application_log_output_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
109        self.application_log_output_uri = ::std::option::Option::Some(input.into());
110        self
111    }
112    /// <p>An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more <code>ApplicationLogPaths</code>.</p><note>
113    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
114    /// </note>
115    pub fn set_application_log_output_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.application_log_output_uri = input;
117        self
118    }
119    /// <p>An Amazon S3 URI to a bucket where you would like Amazon GameLift Streams to save application logs. Required if you specify one or more <code>ApplicationLogPaths</code>.</p><note>
120    /// <p>The log bucket must have permissions that give Amazon GameLift Streams access to write the log files. For more information, see <a href="https://docs.aws.amazon.com/gameliftstreams/latest/developerguide/applications.html#application-bucket-permission-template">Application log bucket permission policy</a> in the <i>Amazon GameLift Streams Developer Guide</i>.</p>
121    /// </note>
122    pub fn get_application_log_output_uri(&self) -> &::std::option::Option<::std::string::String> {
123        &self.application_log_output_uri
124    }
125    /// Consumes the builder and constructs a [`UpdateApplicationInput`](crate::operation::update_application::UpdateApplicationInput).
126    pub fn build(
127        self,
128    ) -> ::std::result::Result<crate::operation::update_application::UpdateApplicationInput, ::aws_smithy_types::error::operation::BuildError> {
129        ::std::result::Result::Ok(crate::operation::update_application::UpdateApplicationInput {
130            identifier: self.identifier,
131            description: self.description,
132            application_log_paths: self.application_log_paths,
133            application_log_output_uri: self.application_log_output_uri,
134        })
135    }
136}