1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>Information about an on-premises instance tag filter.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TagFilter {
/// <p>The on-premises instance tag filter key.</p>
#[doc(hidden)]
pub key: ::std::option::Option<::std::string::String>,
/// <p>The on-premises instance tag filter value.</p>
#[doc(hidden)]
pub value: ::std::option::Option<::std::string::String>,
/// <p>The on-premises instance tag filter type:</p>
/// <ul>
/// <li> <p>KEY_ONLY: Key only.</p> </li>
/// <li> <p>VALUE_ONLY: Value only.</p> </li>
/// <li> <p>KEY_AND_VALUE: Key and value.</p> </li>
/// </ul>
#[doc(hidden)]
pub r#type: ::std::option::Option<crate::types::TagFilterType>,
}
impl TagFilter {
/// <p>The on-premises instance tag filter key.</p>
pub fn key(&self) -> ::std::option::Option<&str> {
self.key.as_deref()
}
/// <p>The on-premises instance tag filter value.</p>
pub fn value(&self) -> ::std::option::Option<&str> {
self.value.as_deref()
}
/// <p>The on-premises instance tag filter type:</p>
/// <ul>
/// <li> <p>KEY_ONLY: Key only.</p> </li>
/// <li> <p>VALUE_ONLY: Value only.</p> </li>
/// <li> <p>KEY_AND_VALUE: Key and value.</p> </li>
/// </ul>
pub fn r#type(&self) -> ::std::option::Option<&crate::types::TagFilterType> {
self.r#type.as_ref()
}
}
impl TagFilter {
/// Creates a new builder-style object to manufacture [`TagFilter`](crate::types::TagFilter).
pub fn builder() -> crate::types::builders::TagFilterBuilder {
crate::types::builders::TagFilterBuilder::default()
}
}
/// A builder for [`TagFilter`](crate::types::TagFilter).
#[non_exhaustive]
#[derive(
::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug,
)]
pub struct TagFilterBuilder {
pub(crate) key: ::std::option::Option<::std::string::String>,
pub(crate) value: ::std::option::Option<::std::string::String>,
pub(crate) r#type: ::std::option::Option<crate::types::TagFilterType>,
}
impl TagFilterBuilder {
/// <p>The on-premises instance tag filter key.</p>
pub fn key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.key = ::std::option::Option::Some(input.into());
self
}
/// <p>The on-premises instance tag filter key.</p>
pub fn set_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.key = input;
self
}
/// <p>The on-premises instance tag filter value.</p>
pub fn value(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.value = ::std::option::Option::Some(input.into());
self
}
/// <p>The on-premises instance tag filter value.</p>
pub fn set_value(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.value = input;
self
}
/// <p>The on-premises instance tag filter type:</p>
/// <ul>
/// <li> <p>KEY_ONLY: Key only.</p> </li>
/// <li> <p>VALUE_ONLY: Value only.</p> </li>
/// <li> <p>KEY_AND_VALUE: Key and value.</p> </li>
/// </ul>
pub fn r#type(mut self, input: crate::types::TagFilterType) -> Self {
self.r#type = ::std::option::Option::Some(input);
self
}
/// <p>The on-premises instance tag filter type:</p>
/// <ul>
/// <li> <p>KEY_ONLY: Key only.</p> </li>
/// <li> <p>VALUE_ONLY: Value only.</p> </li>
/// <li> <p>KEY_AND_VALUE: Key and value.</p> </li>
/// </ul>
pub fn set_type(mut self, input: ::std::option::Option<crate::types::TagFilterType>) -> Self {
self.r#type = input;
self
}
/// Consumes the builder and constructs a [`TagFilter`](crate::types::TagFilter).
pub fn build(self) -> crate::types::TagFilter {
crate::types::TagFilter {
key: self.key,
value: self.value,
r#type: self.r#type,
}
}
}