aws_sdk_athena/types/
_classification.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct Classification {
7 pub name: ::std::option::Option<::std::string::String>,
9 pub properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
11}
12impl Classification {
13 pub fn name(&self) -> ::std::option::Option<&str> {
15 self.name.as_deref()
16 }
17 pub fn properties(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
19 self.properties.as_ref()
20 }
21}
22impl Classification {
23 pub fn builder() -> crate::types::builders::ClassificationBuilder {
25 crate::types::builders::ClassificationBuilder::default()
26 }
27}
28
29#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct ClassificationBuilder {
33 pub(crate) name: ::std::option::Option<::std::string::String>,
34 pub(crate) properties: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
35}
36impl ClassificationBuilder {
37 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
39 self.name = ::std::option::Option::Some(input.into());
40 self
41 }
42 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
44 self.name = input;
45 self
46 }
47 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
49 &self.name
50 }
51 pub fn properties(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
57 let mut hash_map = self.properties.unwrap_or_default();
58 hash_map.insert(k.into(), v.into());
59 self.properties = ::std::option::Option::Some(hash_map);
60 self
61 }
62 pub fn set_properties(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
64 self.properties = input;
65 self
66 }
67 pub fn get_properties(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
69 &self.properties
70 }
71 pub fn build(self) -> crate::types::Classification {
73 crate::types::Classification {
74 name: self.name,
75 properties: self.properties,
76 }
77 }
78}