aws_sdk_iottwinmaker/operation/delete_entity/
_delete_entity_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 DeleteEntityInput {
6    /// <p>The ID of the workspace that contains the entity to delete.</p>
7    pub workspace_id: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the entity to delete.</p>
9    pub entity_id: ::std::option::Option<::std::string::String>,
10    /// <p>A Boolean value that specifies whether the operation deletes child entities.</p>
11    pub is_recursive: ::std::option::Option<bool>,
12}
13impl DeleteEntityInput {
14    /// <p>The ID of the workspace that contains the entity to delete.</p>
15    pub fn workspace_id(&self) -> ::std::option::Option<&str> {
16        self.workspace_id.as_deref()
17    }
18    /// <p>The ID of the entity to delete.</p>
19    pub fn entity_id(&self) -> ::std::option::Option<&str> {
20        self.entity_id.as_deref()
21    }
22    /// <p>A Boolean value that specifies whether the operation deletes child entities.</p>
23    pub fn is_recursive(&self) -> ::std::option::Option<bool> {
24        self.is_recursive
25    }
26}
27impl DeleteEntityInput {
28    /// Creates a new builder-style object to manufacture [`DeleteEntityInput`](crate::operation::delete_entity::DeleteEntityInput).
29    pub fn builder() -> crate::operation::delete_entity::builders::DeleteEntityInputBuilder {
30        crate::operation::delete_entity::builders::DeleteEntityInputBuilder::default()
31    }
32}
33
34/// A builder for [`DeleteEntityInput`](crate::operation::delete_entity::DeleteEntityInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteEntityInputBuilder {
38    pub(crate) workspace_id: ::std::option::Option<::std::string::String>,
39    pub(crate) entity_id: ::std::option::Option<::std::string::String>,
40    pub(crate) is_recursive: ::std::option::Option<bool>,
41}
42impl DeleteEntityInputBuilder {
43    /// <p>The ID of the workspace that contains the entity to delete.</p>
44    /// This field is required.
45    pub fn workspace_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.workspace_id = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The ID of the workspace that contains the entity to delete.</p>
50    pub fn set_workspace_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.workspace_id = input;
52        self
53    }
54    /// <p>The ID of the workspace that contains the entity to delete.</p>
55    pub fn get_workspace_id(&self) -> &::std::option::Option<::std::string::String> {
56        &self.workspace_id
57    }
58    /// <p>The ID of the entity to delete.</p>
59    /// This field is required.
60    pub fn entity_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.entity_id = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The ID of the entity to delete.</p>
65    pub fn set_entity_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.entity_id = input;
67        self
68    }
69    /// <p>The ID of the entity to delete.</p>
70    pub fn get_entity_id(&self) -> &::std::option::Option<::std::string::String> {
71        &self.entity_id
72    }
73    /// <p>A Boolean value that specifies whether the operation deletes child entities.</p>
74    pub fn is_recursive(mut self, input: bool) -> Self {
75        self.is_recursive = ::std::option::Option::Some(input);
76        self
77    }
78    /// <p>A Boolean value that specifies whether the operation deletes child entities.</p>
79    pub fn set_is_recursive(mut self, input: ::std::option::Option<bool>) -> Self {
80        self.is_recursive = input;
81        self
82    }
83    /// <p>A Boolean value that specifies whether the operation deletes child entities.</p>
84    pub fn get_is_recursive(&self) -> &::std::option::Option<bool> {
85        &self.is_recursive
86    }
87    /// Consumes the builder and constructs a [`DeleteEntityInput`](crate::operation::delete_entity::DeleteEntityInput).
88    pub fn build(
89        self,
90    ) -> ::std::result::Result<crate::operation::delete_entity::DeleteEntityInput, ::aws_smithy_types::error::operation::BuildError> {
91        ::std::result::Result::Ok(crate::operation::delete_entity::DeleteEntityInput {
92            workspace_id: self.workspace_id,
93            entity_id: self.entity_id,
94            is_recursive: self.is_recursive,
95        })
96    }
97}