aws_sdk_resourcegroups/operation/delete_group/
_delete_group_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 DeleteGroupInput {
6    /// <p>Deprecated - don't use this parameter. Use <code>Group</code> instead.</p>
7    #[deprecated(note = "This field is deprecated, use Group instead.")]
8    pub group_name: ::std::option::Option<::std::string::String>,
9    /// <p>The name or the Amazon resource name (ARN) of the resource group to delete.</p>
10    pub group: ::std::option::Option<::std::string::String>,
11}
12impl DeleteGroupInput {
13    /// <p>Deprecated - don't use this parameter. Use <code>Group</code> instead.</p>
14    #[deprecated(note = "This field is deprecated, use Group instead.")]
15    pub fn group_name(&self) -> ::std::option::Option<&str> {
16        self.group_name.as_deref()
17    }
18    /// <p>The name or the Amazon resource name (ARN) of the resource group to delete.</p>
19    pub fn group(&self) -> ::std::option::Option<&str> {
20        self.group.as_deref()
21    }
22}
23impl DeleteGroupInput {
24    /// Creates a new builder-style object to manufacture [`DeleteGroupInput`](crate::operation::delete_group::DeleteGroupInput).
25    pub fn builder() -> crate::operation::delete_group::builders::DeleteGroupInputBuilder {
26        crate::operation::delete_group::builders::DeleteGroupInputBuilder::default()
27    }
28}
29
30/// A builder for [`DeleteGroupInput`](crate::operation::delete_group::DeleteGroupInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct DeleteGroupInputBuilder {
34    pub(crate) group_name: ::std::option::Option<::std::string::String>,
35    pub(crate) group: ::std::option::Option<::std::string::String>,
36}
37impl DeleteGroupInputBuilder {
38    /// <p>Deprecated - don't use this parameter. Use <code>Group</code> instead.</p>
39    #[deprecated(note = "This field is deprecated, use Group instead.")]
40    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41        self.group_name = ::std::option::Option::Some(input.into());
42        self
43    }
44    /// <p>Deprecated - don't use this parameter. Use <code>Group</code> instead.</p>
45    #[deprecated(note = "This field is deprecated, use Group instead.")]
46    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
47        self.group_name = input;
48        self
49    }
50    /// <p>Deprecated - don't use this parameter. Use <code>Group</code> instead.</p>
51    #[deprecated(note = "This field is deprecated, use Group instead.")]
52    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
53        &self.group_name
54    }
55    /// <p>The name or the Amazon resource name (ARN) of the resource group to delete.</p>
56    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
57        self.group = ::std::option::Option::Some(input.into());
58        self
59    }
60    /// <p>The name or the Amazon resource name (ARN) of the resource group to delete.</p>
61    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
62        self.group = input;
63        self
64    }
65    /// <p>The name or the Amazon resource name (ARN) of the resource group to delete.</p>
66    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
67        &self.group
68    }
69    /// Consumes the builder and constructs a [`DeleteGroupInput`](crate::operation::delete_group::DeleteGroupInput).
70    pub fn build(self) -> ::std::result::Result<crate::operation::delete_group::DeleteGroupInput, ::aws_smithy_types::error::operation::BuildError> {
71        ::std::result::Result::Ok(crate::operation::delete_group::DeleteGroupInput {
72            group_name: self.group_name,
73            group: self.group,
74        })
75    }
76}