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