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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PutAccountPropertiesInput {
/// <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p>
/// <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p>
/// <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PutAccountPropertiesInput {
/// <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p>
/// <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p>
/// <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.properties.as_ref()
}
}
impl PutAccountPropertiesInput {
/// Creates a new builder-style object to manufacture [`PutAccountPropertiesInput`](crate::operation::put_account_properties::PutAccountPropertiesInput).
pub fn builder() -> crate::operation::put_account_properties::builders::PutAccountPropertiesInputBuilder {
crate::operation::put_account_properties::builders::PutAccountPropertiesInputBuilder::default()
}
}
/// A builder for [`PutAccountPropertiesInput`](crate::operation::put_account_properties::PutAccountPropertiesInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct PutAccountPropertiesInputBuilder {
pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PutAccountPropertiesInputBuilder {
/// Adds a key-value pair to `properties`.
///
/// To override the contents of this collection use [`set_properties`](Self::set_properties).
///
/// <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p>
/// <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p>
/// <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.properties.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.properties = ::std::option::Option::Some(hash_map);
self
}
/// <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p>
/// <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p>
/// <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.properties = input;
self
}
/// <p>A map of property key-value pairs to set. All keys must belong to the same namespace.</p>
/// <p>Each key uses the format <code>Namespace/PropertyName</code>. The key must contain exactly one <code>/</code> separating the namespace from the property name, and cannot start or end with <code>/</code>.</p>
/// <p>The service validates each value based on the property key's expected type. For example, boolean properties expect <code>true</code> or <code>false</code>.</p>
pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.properties
}
/// Consumes the builder and constructs a [`PutAccountPropertiesInput`](crate::operation::put_account_properties::PutAccountPropertiesInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::put_account_properties::PutAccountPropertiesInput, ::aws_smithy_types::error::operation::BuildError>
{
::std::result::Result::Ok(crate::operation::put_account_properties::PutAccountPropertiesInput { properties: self.properties })
}
}