aws_sdk_transfer/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, ::std::fmt::Debug)]
5pub struct UntagResourceInput {
6 /// <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.</p>
7 pub arn: ::std::option::Option<::std::string::String>,
8 /// <p>TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.</p>
9 pub tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10}
11impl UntagResourceInput {
12 /// <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.</p>
13 pub fn arn(&self) -> ::std::option::Option<&str> {
14 self.arn.as_deref()
15 }
16 /// <p>TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.</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 UntagResourceInput {
24 /// Creates a new builder-style object to manufacture [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
25 pub fn builder() -> crate::operation::untag_resource::builders::UntagResourceInputBuilder {
26 crate::operation::untag_resource::builders::UntagResourceInputBuilder::default()
27 }
28}
29
30/// A builder for [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
32#[non_exhaustive]
33pub struct UntagResourceInputBuilder {
34 pub(crate) arn: ::std::option::Option<::std::string::String>,
35 pub(crate) tag_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36}
37impl UntagResourceInputBuilder {
38 /// <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.</p>
39 /// This field is required.
40 pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
41 self.arn = ::std::option::Option::Some(input.into());
42 self
43 }
44 /// <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.</p>
45 pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
46 self.arn = input;
47 self
48 }
49 /// <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific Amazon Web Services resource, such as a server, user, or role.</p>
50 pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
51 &self.arn
52 }
53 /// Appends an item to `tag_keys`.
54 ///
55 /// To override the contents of this collection use [`set_tag_keys`](Self::set_tag_keys).
56 ///
57 /// <p>TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.</p>
58 pub fn tag_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
59 let mut v = self.tag_keys.unwrap_or_default();
60 v.push(input.into());
61 self.tag_keys = ::std::option::Option::Some(v);
62 self
63 }
64 /// <p>TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.</p>
65 pub fn set_tag_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
66 self.tag_keys = input;
67 self
68 }
69 /// <p>TagKeys are key-value pairs assigned to ARNs that can be used to group and search for resources by type. This metadata can be attached to resources for any purpose.</p>
70 pub fn get_tag_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
71 &self.tag_keys
72 }
73 /// Consumes the builder and constructs a [`UntagResourceInput`](crate::operation::untag_resource::UntagResourceInput).
74 pub fn build(
75 self,
76 ) -> ::std::result::Result<crate::operation::untag_resource::UntagResourceInput, ::aws_smithy_types::error::operation::BuildError> {
77 ::std::result::Result::Ok(crate::operation::untag_resource::UntagResourceInput {
78 arn: self.arn,
79 tag_keys: self.tag_keys,
80 })
81 }
82}