aws_sdk_devopsagent/operation/create_chat/
_create_chat_output.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateChatOutput {
7 pub execution_id: ::std::string::String,
9 pub created_at: ::aws_smithy_types::DateTime,
11 _request_id: Option<String>,
12}
13impl CreateChatOutput {
14 pub fn execution_id(&self) -> &str {
16 use std::ops::Deref;
17 self.execution_id.deref()
18 }
19 pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
21 &self.created_at
22 }
23}
24impl ::aws_types::request_id::RequestId for CreateChatOutput {
25 fn request_id(&self) -> Option<&str> {
26 self._request_id.as_deref()
27 }
28}
29impl CreateChatOutput {
30 pub fn builder() -> crate::operation::create_chat::builders::CreateChatOutputBuilder {
32 crate::operation::create_chat::builders::CreateChatOutputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct CreateChatOutputBuilder {
40 pub(crate) execution_id: ::std::option::Option<::std::string::String>,
41 pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
42 _request_id: Option<String>,
43}
44impl CreateChatOutputBuilder {
45 pub fn execution_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.execution_id = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_execution_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.execution_id = input;
54 self
55 }
56 pub fn get_execution_id(&self) -> &::std::option::Option<::std::string::String> {
58 &self.execution_id
59 }
60 pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
63 self.created_at = ::std::option::Option::Some(input);
64 self
65 }
66 pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
68 self.created_at = input;
69 self
70 }
71 pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
73 &self.created_at
74 }
75 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
76 self._request_id = Some(request_id.into());
77 self
78 }
79
80 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
81 self._request_id = request_id;
82 self
83 }
84 pub fn build(self) -> ::std::result::Result<crate::operation::create_chat::CreateChatOutput, ::aws_smithy_types::error::operation::BuildError> {
89 ::std::result::Result::Ok(crate::operation::create_chat::CreateChatOutput {
90 execution_id: self.execution_id.ok_or_else(|| {
91 ::aws_smithy_types::error::operation::BuildError::missing_field(
92 "execution_id",
93 "execution_id was not specified but it is required when building CreateChatOutput",
94 )
95 })?,
96 created_at: self.created_at.ok_or_else(|| {
97 ::aws_smithy_types::error::operation::BuildError::missing_field(
98 "created_at",
99 "created_at was not specified but it is required when building CreateChatOutput",
100 )
101 })?,
102 _request_id: self._request_id,
103 })
104 }
105}