aws_sdk_lexmodelsv2/operation/delete_bot/_delete_bot_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 DeleteBotInput {
6 /// <p>The identifier of the bot to delete.</p>
7 pub bot_id: ::std::option::Option<::std::string::String>,
8 /// <p>By default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a <code>ResourceInUseException</code> exception if the bot is being used by another resource. Set this parameter to <code>true</code> to skip this check and remove the bot even if it is being used by another resource.</p>
9 pub skip_resource_in_use_check: ::std::option::Option<bool>,
10}
11impl DeleteBotInput {
12 /// <p>The identifier of the bot to delete.</p>
13 pub fn bot_id(&self) -> ::std::option::Option<&str> {
14 self.bot_id.as_deref()
15 }
16 /// <p>By default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a <code>ResourceInUseException</code> exception if the bot is being used by another resource. Set this parameter to <code>true</code> to skip this check and remove the bot even if it is being used by another resource.</p>
17 pub fn skip_resource_in_use_check(&self) -> ::std::option::Option<bool> {
18 self.skip_resource_in_use_check
19 }
20}
21impl DeleteBotInput {
22 /// Creates a new builder-style object to manufacture [`DeleteBotInput`](crate::operation::delete_bot::DeleteBotInput).
23 pub fn builder() -> crate::operation::delete_bot::builders::DeleteBotInputBuilder {
24 crate::operation::delete_bot::builders::DeleteBotInputBuilder::default()
25 }
26}
27
28/// A builder for [`DeleteBotInput`](crate::operation::delete_bot::DeleteBotInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteBotInputBuilder {
32 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
33 pub(crate) skip_resource_in_use_check: ::std::option::Option<bool>,
34}
35impl DeleteBotInputBuilder {
36 /// <p>The identifier of the bot to delete.</p>
37 /// This field is required.
38 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.bot_id = ::std::option::Option::Some(input.into());
40 self
41 }
42 /// <p>The identifier of the bot to delete.</p>
43 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.bot_id = input;
45 self
46 }
47 /// <p>The identifier of the bot to delete.</p>
48 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
49 &self.bot_id
50 }
51 /// <p>By default, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a <code>ResourceInUseException</code> exception if the bot is being used by another resource. Set this parameter to <code>true</code> to skip this check and remove the bot even if it is being used by another resource.</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, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a <code>ResourceInUseException</code> exception if the bot is being used by another resource. Set this parameter to <code>true</code> to skip this check and remove the bot even if it is being used by another resource.</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, Amazon Lex checks if any other resource, such as an alias or bot network, is using the bot version before it is deleted and throws a <code>ResourceInUseException</code> exception if the bot is being used by another resource. Set this parameter to <code>true</code> to skip this check and remove the bot even if it is being used by another resource.</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 [`DeleteBotInput`](crate::operation::delete_bot::DeleteBotInput).
66 pub fn build(self) -> ::std::result::Result<crate::operation::delete_bot::DeleteBotInput, ::aws_smithy_types::error::operation::BuildError> {
67 ::std::result::Result::Ok(crate::operation::delete_bot::DeleteBotInput {
68 bot_id: self.bot_id,
69 skip_resource_in_use_check: self.skip_resource_in_use_check,
70 })
71 }
72}