aws_sdk_amplify/operation/create_deployment/
_create_deployment_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateDeploymentOutput {
7 pub job_id: ::std::option::Option<::std::string::String>,
9 pub file_upload_urls: ::std::collections::HashMap<::std::string::String, ::std::string::String>,
11 pub zip_upload_url: ::std::string::String,
13 _request_id: Option<String>,
14}
15impl CreateDeploymentOutput {
16 pub fn job_id(&self) -> ::std::option::Option<&str> {
18 self.job_id.as_deref()
19 }
20 pub fn file_upload_urls(&self) -> &::std::collections::HashMap<::std::string::String, ::std::string::String> {
22 &self.file_upload_urls
23 }
24 pub fn zip_upload_url(&self) -> &str {
26 use std::ops::Deref;
27 self.zip_upload_url.deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for CreateDeploymentOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl CreateDeploymentOutput {
36 pub fn builder() -> crate::operation::create_deployment::builders::CreateDeploymentOutputBuilder {
38 crate::operation::create_deployment::builders::CreateDeploymentOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateDeploymentOutputBuilder {
46 pub(crate) job_id: ::std::option::Option<::std::string::String>,
47 pub(crate) file_upload_urls: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
48 pub(crate) zip_upload_url: ::std::option::Option<::std::string::String>,
49 _request_id: Option<String>,
50}
51impl CreateDeploymentOutputBuilder {
52 pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.job_id = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.job_id = input;
60 self
61 }
62 pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
64 &self.job_id
65 }
66 pub fn file_upload_urls(
72 mut self,
73 k: impl ::std::convert::Into<::std::string::String>,
74 v: impl ::std::convert::Into<::std::string::String>,
75 ) -> Self {
76 let mut hash_map = self.file_upload_urls.unwrap_or_default();
77 hash_map.insert(k.into(), v.into());
78 self.file_upload_urls = ::std::option::Option::Some(hash_map);
79 self
80 }
81 pub fn set_file_upload_urls(
83 mut self,
84 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
85 ) -> Self {
86 self.file_upload_urls = input;
87 self
88 }
89 pub fn get_file_upload_urls(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
91 &self.file_upload_urls
92 }
93 pub fn zip_upload_url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
96 self.zip_upload_url = ::std::option::Option::Some(input.into());
97 self
98 }
99 pub fn set_zip_upload_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
101 self.zip_upload_url = input;
102 self
103 }
104 pub fn get_zip_upload_url(&self) -> &::std::option::Option<::std::string::String> {
106 &self.zip_upload_url
107 }
108 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
109 self._request_id = Some(request_id.into());
110 self
111 }
112
113 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
114 self._request_id = request_id;
115 self
116 }
117 pub fn build(
122 self,
123 ) -> ::std::result::Result<crate::operation::create_deployment::CreateDeploymentOutput, ::aws_smithy_types::error::operation::BuildError> {
124 ::std::result::Result::Ok(crate::operation::create_deployment::CreateDeploymentOutput {
125 job_id: self.job_id,
126 file_upload_urls: self.file_upload_urls.ok_or_else(|| {
127 ::aws_smithy_types::error::operation::BuildError::missing_field(
128 "file_upload_urls",
129 "file_upload_urls was not specified but it is required when building CreateDeploymentOutput",
130 )
131 })?,
132 zip_upload_url: self.zip_upload_url.ok_or_else(|| {
133 ::aws_smithy_types::error::operation::BuildError::missing_field(
134 "zip_upload_url",
135 "zip_upload_url was not specified but it is required when building CreateDeploymentOutput",
136 )
137 })?,
138 _request_id: self._request_id,
139 })
140 }
141}