aws_sdk_resourcegroups/operation/update_group/
_update_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 UpdateGroupInput {
6    /// <p>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 ARN of the resource group to update.</p>
10    pub group: ::std::option::Option<::std::string::String>,
11    /// <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
12    pub description: ::std::option::Option<::std::string::String>,
13    /// <p>The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.</p>
14    pub criticality: ::std::option::Option<i32>,
15    /// <p>A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.</p>
16    pub owner: ::std::option::Option<::std::string::String>,
17    /// <p>The name of the application group, which you can change at any time.</p>
18    pub display_name: ::std::option::Option<::std::string::String>,
19}
20impl UpdateGroupInput {
21    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
22    #[deprecated(note = "This field is deprecated, use Group instead.")]
23    pub fn group_name(&self) -> ::std::option::Option<&str> {
24        self.group_name.as_deref()
25    }
26    /// <p>The name or the ARN of the resource group to update.</p>
27    pub fn group(&self) -> ::std::option::Option<&str> {
28        self.group.as_deref()
29    }
30    /// <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
31    pub fn description(&self) -> ::std::option::Option<&str> {
32        self.description.as_deref()
33    }
34    /// <p>The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.</p>
35    pub fn criticality(&self) -> ::std::option::Option<i32> {
36        self.criticality
37    }
38    /// <p>A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.</p>
39    pub fn owner(&self) -> ::std::option::Option<&str> {
40        self.owner.as_deref()
41    }
42    /// <p>The name of the application group, which you can change at any time.</p>
43    pub fn display_name(&self) -> ::std::option::Option<&str> {
44        self.display_name.as_deref()
45    }
46}
47impl UpdateGroupInput {
48    /// Creates a new builder-style object to manufacture [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
49    pub fn builder() -> crate::operation::update_group::builders::UpdateGroupInputBuilder {
50        crate::operation::update_group::builders::UpdateGroupInputBuilder::default()
51    }
52}
53
54/// A builder for [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
55#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
56#[non_exhaustive]
57pub struct UpdateGroupInputBuilder {
58    pub(crate) group_name: ::std::option::Option<::std::string::String>,
59    pub(crate) group: ::std::option::Option<::std::string::String>,
60    pub(crate) description: ::std::option::Option<::std::string::String>,
61    pub(crate) criticality: ::std::option::Option<i32>,
62    pub(crate) owner: ::std::option::Option<::std::string::String>,
63    pub(crate) display_name: ::std::option::Option<::std::string::String>,
64}
65impl UpdateGroupInputBuilder {
66    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
67    #[deprecated(note = "This field is deprecated, use Group instead.")]
68    pub fn group_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.group_name = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
73    #[deprecated(note = "This field is deprecated, use Group instead.")]
74    pub fn set_group_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
75        self.group_name = input;
76        self
77    }
78    /// <p>Don't use this parameter. Use <code>Group</code> instead.</p>
79    #[deprecated(note = "This field is deprecated, use Group instead.")]
80    pub fn get_group_name(&self) -> &::std::option::Option<::std::string::String> {
81        &self.group_name
82    }
83    /// <p>The name or the ARN of the resource group to update.</p>
84    pub fn group(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
85        self.group = ::std::option::Option::Some(input.into());
86        self
87    }
88    /// <p>The name or the ARN of the resource group to update.</p>
89    pub fn set_group(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
90        self.group = input;
91        self
92    }
93    /// <p>The name or the ARN of the resource group to update.</p>
94    pub fn get_group(&self) -> &::std::option::Option<::std::string::String> {
95        &self.group
96    }
97    /// <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
98    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
99        self.description = ::std::option::Option::Some(input.into());
100        self
101    }
102    /// <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
103    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
104        self.description = input;
105        self
106    }
107    /// <p>The new description that you want to update the resource group with. Descriptions can contain letters, numbers, hyphens, underscores, periods, and spaces.</p>
108    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
109        &self.description
110    }
111    /// <p>The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.</p>
112    pub fn criticality(mut self, input: i32) -> Self {
113        self.criticality = ::std::option::Option::Some(input);
114        self
115    }
116    /// <p>The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.</p>
117    pub fn set_criticality(mut self, input: ::std::option::Option<i32>) -> Self {
118        self.criticality = input;
119        self
120    }
121    /// <p>The critical rank of the application group on a scale of 1 to 10, with a rank of 1 being the most critical, and a rank of 10 being least critical.</p>
122    pub fn get_criticality(&self) -> &::std::option::Option<i32> {
123        &self.criticality
124    }
125    /// <p>A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.</p>
126    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127        self.owner = ::std::option::Option::Some(input.into());
128        self
129    }
130    /// <p>A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.</p>
131    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132        self.owner = input;
133        self
134    }
135    /// <p>A name, email address or other identifier for the person or group who is considered as the owner of this application group within your organization.</p>
136    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
137        &self.owner
138    }
139    /// <p>The name of the application group, which you can change at any time.</p>
140    pub fn display_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
141        self.display_name = ::std::option::Option::Some(input.into());
142        self
143    }
144    /// <p>The name of the application group, which you can change at any time.</p>
145    pub fn set_display_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
146        self.display_name = input;
147        self
148    }
149    /// <p>The name of the application group, which you can change at any time.</p>
150    pub fn get_display_name(&self) -> &::std::option::Option<::std::string::String> {
151        &self.display_name
152    }
153    /// Consumes the builder and constructs a [`UpdateGroupInput`](crate::operation::update_group::UpdateGroupInput).
154    pub fn build(self) -> ::std::result::Result<crate::operation::update_group::UpdateGroupInput, ::aws_smithy_types::error::operation::BuildError> {
155        ::std::result::Result::Ok(crate::operation::update_group::UpdateGroupInput {
156            group_name: self.group_name,
157            group: self.group,
158            description: self.description,
159            criticality: self.criticality,
160            owner: self.owner,
161            display_name: self.display_name,
162        })
163    }
164}