aws_sdk_continuum/operation/create_integration/
_create_integration_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateIntegrationOutput {
7 pub integration_id: ::std::string::String,
9 pub integration_arn: ::std::string::String,
11 pub created_at: ::aws_smithy_types::DateTime,
13 _request_id: Option<String>,
14}
15impl CreateIntegrationOutput {
16 pub fn integration_id(&self) -> &str {
18 use std::ops::Deref;
19 self.integration_id.deref()
20 }
21 pub fn integration_arn(&self) -> &str {
23 use std::ops::Deref;
24 self.integration_arn.deref()
25 }
26 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
28 &self.created_at
29 }
30}
31impl ::aws_types::request_id::RequestId for CreateIntegrationOutput {
32 fn request_id(&self) -> Option<&str> {
33 self._request_id.as_deref()
34 }
35}
36impl CreateIntegrationOutput {
37 pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationOutputBuilder {
39 crate::operation::create_integration::builders::CreateIntegrationOutputBuilder::default()
40 }
41}
42
43#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
45#[non_exhaustive]
46pub struct CreateIntegrationOutputBuilder {
47 pub(crate) integration_id: ::std::option::Option<::std::string::String>,
48 pub(crate) integration_arn: ::std::option::Option<::std::string::String>,
49 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
50 _request_id: Option<String>,
51}
52impl CreateIntegrationOutputBuilder {
53 pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
56 self.integration_id = ::std::option::Option::Some(input.into());
57 self
58 }
59 pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
61 self.integration_id = input;
62 self
63 }
64 pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
66 &self.integration_id
67 }
68 pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71 self.integration_arn = ::std::option::Option::Some(input.into());
72 self
73 }
74 pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.integration_arn = input;
77 self
78 }
79 pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
81 &self.integration_arn
82 }
83 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
86 self.created_at = ::std::option::Option::Some(input);
87 self
88 }
89 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
91 self.created_at = input;
92 self
93 }
94 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
96 &self.created_at
97 }
98 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
99 self._request_id = Some(request_id.into());
100 self
101 }
102
103 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
104 self._request_id = request_id;
105 self
106 }
107 pub fn build(
113 self,
114 ) -> ::std::result::Result<crate::operation::create_integration::CreateIntegrationOutput, ::aws_smithy_types::error::operation::BuildError> {
115 ::std::result::Result::Ok(crate::operation::create_integration::CreateIntegrationOutput {
116 integration_id: self.integration_id.ok_or_else(|| {
117 ::aws_smithy_types::error::operation::BuildError::missing_field(
118 "integration_id",
119 "integration_id was not specified but it is required when building CreateIntegrationOutput",
120 )
121 })?,
122 integration_arn: self.integration_arn.ok_or_else(|| {
123 ::aws_smithy_types::error::operation::BuildError::missing_field(
124 "integration_arn",
125 "integration_arn was not specified but it is required when building CreateIntegrationOutput",
126 )
127 })?,
128 created_at: self.created_at.ok_or_else(|| {
129 ::aws_smithy_types::error::operation::BuildError::missing_field(
130 "created_at",
131 "created_at was not specified but it is required when building CreateIntegrationOutput",
132 )
133 })?,
134 _request_id: self._request_id,
135 })
136 }
137}