aws_sdk_gamelift/operation/create_build/
_create_build_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)]
5pub struct CreateBuildOutput {
6    /// <p>The newly created build resource, including a unique build IDs and status.</p>
7    ///
8    /// _Note: This member has been renamed from `build`._
9    pub build_value: ::std::option::Option<crate::types::Build>,
10    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift Servers. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>.</p>
11    pub upload_credentials: ::std::option::Option<crate::types::AwsCredentials>,
12    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
13    pub storage_location: ::std::option::Option<crate::types::S3Location>,
14    _request_id: Option<String>,
15}
16impl CreateBuildOutput {
17    /// <p>The newly created build resource, including a unique build IDs and status.</p>
18    ///
19    /// _Note: This member has been renamed from `build`._
20    pub fn build_value(&self) -> ::std::option::Option<&crate::types::Build> {
21        self.build_value.as_ref()
22    }
23    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift Servers. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>.</p>
24    pub fn upload_credentials(&self) -> ::std::option::Option<&crate::types::AwsCredentials> {
25        self.upload_credentials.as_ref()
26    }
27    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
28    pub fn storage_location(&self) -> ::std::option::Option<&crate::types::S3Location> {
29        self.storage_location.as_ref()
30    }
31}
32impl ::std::fmt::Debug for CreateBuildOutput {
33    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
34        let mut formatter = f.debug_struct("CreateBuildOutput");
35        formatter.field("build_value", &self.build_value);
36        formatter.field("upload_credentials", &"*** Sensitive Data Redacted ***");
37        formatter.field("storage_location", &self.storage_location);
38        formatter.field("_request_id", &self._request_id);
39        formatter.finish()
40    }
41}
42impl ::aws_types::request_id::RequestId for CreateBuildOutput {
43    fn request_id(&self) -> Option<&str> {
44        self._request_id.as_deref()
45    }
46}
47impl CreateBuildOutput {
48    /// Creates a new builder-style object to manufacture [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
49    pub fn builder() -> crate::operation::create_build::builders::CreateBuildOutputBuilder {
50        crate::operation::create_build::builders::CreateBuildOutputBuilder::default()
51    }
52}
53
54/// A builder for [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
56#[non_exhaustive]
57pub struct CreateBuildOutputBuilder {
58    pub(crate) build_value: ::std::option::Option<crate::types::Build>,
59    pub(crate) upload_credentials: ::std::option::Option<crate::types::AwsCredentials>,
60    pub(crate) storage_location: ::std::option::Option<crate::types::S3Location>,
61    _request_id: Option<String>,
62}
63impl CreateBuildOutputBuilder {
64    /// <p>The newly created build resource, including a unique build IDs and status.</p>
65    pub fn build_value(mut self, input: crate::types::Build) -> Self {
66        self.build_value = ::std::option::Option::Some(input);
67        self
68    }
69    /// <p>The newly created build resource, including a unique build IDs and status.</p>
70    pub fn set_build(mut self, input: ::std::option::Option<crate::types::Build>) -> Self {
71        self.build_value = input;
72        self
73    }
74    /// <p>The newly created build resource, including a unique build IDs and status.</p>
75    pub fn get_build(&self) -> &::std::option::Option<crate::types::Build> {
76        &self.build_value
77    }
78    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift Servers. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>.</p>
79    pub fn upload_credentials(mut self, input: crate::types::AwsCredentials) -> Self {
80        self.upload_credentials = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift Servers. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>.</p>
84    pub fn set_upload_credentials(mut self, input: ::std::option::Option<crate::types::AwsCredentials>) -> Self {
85        self.upload_credentials = input;
86        self
87    }
88    /// <p>This element is returned only when the operation is called without a storage location. It contains credentials to use when you are uploading a build file to an Amazon S3 bucket that is owned by Amazon GameLift Servers. Credentials have a limited life span. To refresh these credentials, call <a href="https://docs.aws.amazon.com/gamelift/latest/apireference/API_RequestUploadCredentials.html">RequestUploadCredentials</a>.</p>
89    pub fn get_upload_credentials(&self) -> &::std::option::Option<crate::types::AwsCredentials> {
90        &self.upload_credentials
91    }
92    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
93    pub fn storage_location(mut self, input: crate::types::S3Location) -> Self {
94        self.storage_location = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
98    pub fn set_storage_location(mut self, input: ::std::option::Option<crate::types::S3Location>) -> Self {
99        self.storage_location = input;
100        self
101    }
102    /// <p>Amazon S3 location for your game build file, including bucket name and key.</p>
103    pub fn get_storage_location(&self) -> &::std::option::Option<crate::types::S3Location> {
104        &self.storage_location
105    }
106    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
107        self._request_id = Some(request_id.into());
108        self
109    }
110
111    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
112        self._request_id = request_id;
113        self
114    }
115    /// Consumes the builder and constructs a [`CreateBuildOutput`](crate::operation::create_build::CreateBuildOutput).
116    pub fn build(self) -> crate::operation::create_build::CreateBuildOutput {
117        crate::operation::create_build::CreateBuildOutput {
118            build_value: self.build_value,
119            upload_credentials: self.upload_credentials,
120            storage_location: self.storage_location,
121            _request_id: self._request_id,
122        }
123    }
124}
125impl ::std::fmt::Debug for CreateBuildOutputBuilder {
126    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
127        let mut formatter = f.debug_struct("CreateBuildOutputBuilder");
128        formatter.field("build_value", &self.build_value);
129        formatter.field("upload_credentials", &"*** Sensitive Data Redacted ***");
130        formatter.field("storage_location", &self.storage_location);
131        formatter.field("_request_id", &self._request_id);
132        formatter.finish()
133    }
134}