aws_sdk_appflow/operation/delete_flow/
_delete_flow_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 DeleteFlowInput {
6    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
7    pub flow_name: ::std::option::Option<::std::string::String>,
8    /// <p>Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.</p>
9    pub force_delete: ::std::option::Option<bool>,
10}
11impl DeleteFlowInput {
12    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
13    pub fn flow_name(&self) -> ::std::option::Option<&str> {
14        self.flow_name.as_deref()
15    }
16    /// <p>Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.</p>
17    pub fn force_delete(&self) -> ::std::option::Option<bool> {
18        self.force_delete
19    }
20}
21impl DeleteFlowInput {
22    /// Creates a new builder-style object to manufacture [`DeleteFlowInput`](crate::operation::delete_flow::DeleteFlowInput).
23    pub fn builder() -> crate::operation::delete_flow::builders::DeleteFlowInputBuilder {
24        crate::operation::delete_flow::builders::DeleteFlowInputBuilder::default()
25    }
26}
27
28/// A builder for [`DeleteFlowInput`](crate::operation::delete_flow::DeleteFlowInput).
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
30#[non_exhaustive]
31pub struct DeleteFlowInputBuilder {
32    pub(crate) flow_name: ::std::option::Option<::std::string::String>,
33    pub(crate) force_delete: ::std::option::Option<bool>,
34}
35impl DeleteFlowInputBuilder {
36    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
37    /// This field is required.
38    pub fn flow_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39        self.flow_name = ::std::option::Option::Some(input.into());
40        self
41    }
42    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
43    pub fn set_flow_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44        self.flow_name = input;
45        self
46    }
47    /// <p>The specified name of the flow. Spaces are not allowed. Use underscores (_) or hyphens (-) only.</p>
48    pub fn get_flow_name(&self) -> &::std::option::Option<::std::string::String> {
49        &self.flow_name
50    }
51    /// <p>Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.</p>
52    pub fn force_delete(mut self, input: bool) -> Self {
53        self.force_delete = ::std::option::Option::Some(input);
54        self
55    }
56    /// <p>Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.</p>
57    pub fn set_force_delete(mut self, input: ::std::option::Option<bool>) -> Self {
58        self.force_delete = input;
59        self
60    }
61    /// <p>Indicates whether Amazon AppFlow should delete the flow, even if it is currently in use.</p>
62    pub fn get_force_delete(&self) -> &::std::option::Option<bool> {
63        &self.force_delete
64    }
65    /// Consumes the builder and constructs a [`DeleteFlowInput`](crate::operation::delete_flow::DeleteFlowInput).
66    pub fn build(self) -> ::std::result::Result<crate::operation::delete_flow::DeleteFlowInput, ::aws_smithy_types::error::operation::BuildError> {
67        ::std::result::Result::Ok(crate::operation::delete_flow::DeleteFlowInput {
68            flow_name: self.flow_name,
69            force_delete: self.force_delete,
70        })
71    }
72}