aws_sdk_bedrockagent/operation/delete_prompt/
_delete_prompt_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeletePromptOutput {
6 pub id: ::std::string::String,
8 pub version: ::std::option::Option<::std::string::String>,
10 _request_id: Option<String>,
11}
12impl DeletePromptOutput {
13 pub fn id(&self) -> &str {
15 use std::ops::Deref;
16 self.id.deref()
17 }
18 pub fn version(&self) -> ::std::option::Option<&str> {
20 self.version.as_deref()
21 }
22}
23impl ::aws_types::request_id::RequestId for DeletePromptOutput {
24 fn request_id(&self) -> Option<&str> {
25 self._request_id.as_deref()
26 }
27}
28impl DeletePromptOutput {
29 pub fn builder() -> crate::operation::delete_prompt::builders::DeletePromptOutputBuilder {
31 crate::operation::delete_prompt::builders::DeletePromptOutputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct DeletePromptOutputBuilder {
39 pub(crate) id: ::std::option::Option<::std::string::String>,
40 pub(crate) version: ::std::option::Option<::std::string::String>,
41 _request_id: Option<String>,
42}
43impl DeletePromptOutputBuilder {
44 pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.id = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.id = input;
53 self
54 }
55 pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
57 &self.id
58 }
59 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.version = ::std::option::Option::Some(input.into());
62 self
63 }
64 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.version = input;
67 self
68 }
69 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
71 &self.version
72 }
73 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
74 self._request_id = Some(request_id.into());
75 self
76 }
77
78 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
79 self._request_id = request_id;
80 self
81 }
82 pub fn build(
86 self,
87 ) -> ::std::result::Result<crate::operation::delete_prompt::DeletePromptOutput, ::aws_smithy_types::error::operation::BuildError> {
88 ::std::result::Result::Ok(crate::operation::delete_prompt::DeletePromptOutput {
89 id: self.id.ok_or_else(|| {
90 ::aws_smithy_types::error::operation::BuildError::missing_field(
91 "id",
92 "id was not specified but it is required when building DeletePromptOutput",
93 )
94 })?,
95 version: self.version,
96 _request_id: self._request_id,
97 })
98 }
99}