aws_sdk_emrserverless/operation/create_application/
_create_application_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateApplicationOutput {
6 pub application_id: ::std::string::String,
8 pub name: ::std::option::Option<::std::string::String>,
10 pub arn: ::std::string::String,
12 _request_id: Option<String>,
13}
14impl CreateApplicationOutput {
15 pub fn application_id(&self) -> &str {
17 use std::ops::Deref;
18 self.application_id.deref()
19 }
20 pub fn name(&self) -> ::std::option::Option<&str> {
22 self.name.as_deref()
23 }
24 pub fn arn(&self) -> &str {
26 use std::ops::Deref;
27 self.arn.deref()
28 }
29}
30impl ::aws_types::request_id::RequestId for CreateApplicationOutput {
31 fn request_id(&self) -> Option<&str> {
32 self._request_id.as_deref()
33 }
34}
35impl CreateApplicationOutput {
36 pub fn builder() -> crate::operation::create_application::builders::CreateApplicationOutputBuilder {
38 crate::operation::create_application::builders::CreateApplicationOutputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct CreateApplicationOutputBuilder {
46 pub(crate) application_id: ::std::option::Option<::std::string::String>,
47 pub(crate) name: ::std::option::Option<::std::string::String>,
48 pub(crate) arn: ::std::option::Option<::std::string::String>,
49 _request_id: Option<String>,
50}
51impl CreateApplicationOutputBuilder {
52 pub fn application_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
55 self.application_id = ::std::option::Option::Some(input.into());
56 self
57 }
58 pub fn set_application_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
60 self.application_id = input;
61 self
62 }
63 pub fn get_application_id(&self) -> &::std::option::Option<::std::string::String> {
65 &self.application_id
66 }
67 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69 self.name = ::std::option::Option::Some(input.into());
70 self
71 }
72 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74 self.name = input;
75 self
76 }
77 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
79 &self.name
80 }
81 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84 self.arn = ::std::option::Option::Some(input.into());
85 self
86 }
87 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89 self.arn = input;
90 self
91 }
92 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
94 &self.arn
95 }
96 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
97 self._request_id = Some(request_id.into());
98 self
99 }
100
101 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
102 self._request_id = request_id;
103 self
104 }
105 pub fn build(
110 self,
111 ) -> ::std::result::Result<crate::operation::create_application::CreateApplicationOutput, ::aws_smithy_types::error::operation::BuildError> {
112 ::std::result::Result::Ok(crate::operation::create_application::CreateApplicationOutput {
113 application_id: self.application_id.ok_or_else(|| {
114 ::aws_smithy_types::error::operation::BuildError::missing_field(
115 "application_id",
116 "application_id was not specified but it is required when building CreateApplicationOutput",
117 )
118 })?,
119 name: self.name,
120 arn: self.arn.ok_or_else(|| {
121 ::aws_smithy_types::error::operation::BuildError::missing_field(
122 "arn",
123 "arn was not specified but it is required when building CreateApplicationOutput",
124 )
125 })?,
126 _request_id: self._request_id,
127 })
128 }
129}