Skip to main content

aws_sdk_cloud9/operation/untag_resource/
_untag_resource_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)]
5pub struct UntagResourceInput {
6    /// <p>The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.</p>
7    pub resource_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The tag names of the tags to remove from the given Cloud9 development environment.</p>
9    pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10}
11impl UntagResourceInput {
12    /// <p>The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.</p>
13    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
14        self.resource_arn.as_deref()
15    }
16    /// <p>The tag names of the tags to remove from the given Cloud9 development environment.</p>
17    ///
18    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tag_keys.is_none()`.
19    pub fn tag_keys(&self) -> &[::std::string::String] {
20        self.tag_keys.as_deref().unwrap_or_default()
21    }
22}
23impl ::std::fmt::Debug for UntagResourceInput {
24    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
25        let mut formatter = f.debug_struct("UntagResourceInput");
26        formatter.field("resource_arn", &self.resource_arn);
27        formatter.field("tag_keys", &"*** Sensitive Data Redacted ***");
28        formatter.finish()
29    }
30}
31impl UntagResourceInput {
32    /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
33    pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceInputBuilder {
34        crate::operation::untag_resource::builders::UntagResourceInputBuilder::default()
35    }
36}
37
38/// A builder for [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
39#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
40#[non_exhaustive]
41pub struct UntagResourceInputBuilder {
42    pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
43    pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
44}
45impl UntagResourceInputBuilder {
46    /// <p>The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.</p>
47    /// This field is required.
48    pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49        self.resource_arn = ::std::option::Option::Some(input.into());
50        self
51    }
52    /// <p>The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.</p>
53    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54        self.resource_arn = input;
55        self
56    }
57    /// <p>The Amazon Resource Name (ARN) of the Cloud9 development environment to remove tags from.</p>
58    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
59        &self.resource_arn
60    }
61    /// Appends an item to `tag_keys`.
62    ///
63    /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
64    ///
65    /// <p>The tag names of the tags to remove from the given Cloud9 development environment.</p>
66    pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
67        let mut v = self.tag_keys.unwrap_or_default();
68        v.push(input.into());
69        self.tag_keys = ::std::option::Option::Some(v);
70        self
71    }
72    /// <p>The tag names of the tags to remove from the given Cloud9 development environment.</p>
73    pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
74        self.tag_keys = input;
75        self
76    }
77    /// <p>The tag names of the tags to remove from the given Cloud9 development environment.</p>
78    pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
79        &self.tag_keys
80    }
81    /// Consumes the builder and constructs a [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
82    pub fn build(
83        self,
84    ) -> ::std::result::Result<crate::operation::untag_resource::UntagResourceInput, ::aws_smithy_types::error::operation::BuildError> {
85        ::std::result::Result::Ok(crate::operation::untag_resource::UntagResourceInput {
86            resource_arn: self.resource_arn,
87            tag_keys: self.tag_keys,
88        })
89    }
90}
91impl ::std::fmt::Debug for UntagResourceInputBuilder {
92    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
93        let mut formatter = f.debug_struct("UntagResourceInputBuilder");
94        formatter.field("resource_arn", &self.resource_arn);
95        formatter.field("tag_keys", &"*** Sensitive Data Redacted ***");
96        formatter.finish()
97    }
98}