aws_sdk_bedrockagent/operation/delete_agent/
_delete_agent_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DeleteAgentInput {
6    /// <p>The unique identifier of the agent to delete.</p>
7    pub agent_id: ::std::option::Option<::std::string::String>,
8    /// <p>By default, this value is <code>false</code> and deletion is stopped if the resource is in use. If you set it to <code>true</code>, the resource will be deleted even if the resource is in use.</p>
9    pub skip_resource_in_use_check: ::std::option::Option<bool>,
10}
11impl DeleteAgentInput {
12    /// <p>The unique identifier of the agent to delete.</p>
13    pub fn agent_id(&self) -> ::std::option::Option<&str> {
14        self.agent_id.as_deref()
15    }
16    /// <p>By default, this value is <code>false</code> and deletion is stopped if the resource is in use. If you set it to <code>true</code>, the resource will be deleted even if the resource is in use.</p>
17    pub fn skip_resource_in_use_check(&self) -> ::std::option::Option<bool> {
18        self.skip_resource_in_use_check
19    }
20}
21impl DeleteAgentInput {
22    /// Creates a new builder-style object to manufacture [`DeleteAgentInput`](crate::operation::delete_agent::DeleteAgentInput).
23    pub fn builder() -> crate::operation::delete_agent::builders::DeleteAgentInputBuilder {
24        crate::operation::delete_agent::builders::DeleteAgentInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteAgentInput`](crate::operation::delete_agent::DeleteAgentInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteAgentInputBuilder {
32    pub(crate) agent_id: ::std::option::Option<::std::string::String>,
33    pub(crate) skip_resource_in_use_check: ::std::option::Option<bool>,
34}
35impl DeleteAgentInputBuilder {
36    /// <p>The unique identifier of the agent to delete.</p>
37    /// This field is required.
38    pub fn agent_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.agent_id = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The unique identifier of the agent to delete.</p>
43    pub fn set_agent_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.agent_id = input;
45        self
46    }
47    /// <p>The unique identifier of the agent to delete.</p>
48    pub fn get_agent_id(&self) -> &::std::option::Option<::std::string::String> {
49        &self.agent_id
50    }
51    /// <p>By default, this value is <code>false</code> and deletion is stopped if the resource is in use. If you set it to <code>true</code>, the resource will be deleted even if the resource is in use.</p>
52    pub fn skip_resource_in_use_check(mut self, input: bool) -> Self {
53        self.skip_resource_in_use_check = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>By default, this value is <code>false</code> and deletion is stopped if the resource is in use. If you set it to <code>true</code>, the resource will be deleted even if the resource is in use.</p>
57    pub fn set_skip_resource_in_use_check(mut self, input: ::std::option::Option<bool>) -> Self {
58        self.skip_resource_in_use_check = input;
59        self
60    }
61    /// <p>By default, this value is <code>false</code> and deletion is stopped if the resource is in use. If you set it to <code>true</code>, the resource will be deleted even if the resource is in use.</p>
62    pub fn get_skip_resource_in_use_check(&self) -> &::std::option::Option<bool> {
63        &self.skip_resource_in_use_check
64    }
65    /// Consumes the builder and constructs a [`DeleteAgentInput`](crate::operation::delete_agent::DeleteAgentInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::delete_agent::DeleteAgentInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::delete_agent::DeleteAgentInput {
68            agent_id: self.agent_id,
69            skip_resource_in_use_check: self.skip_resource_in_use_check,
70        })
71    }
72}