aws_sdk_elasticloadbalancingv2/operation/create_trust_store/
_create_trust_store_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 CreateTrustStoreInput {
6    /// <p>The name of the trust store.</p>
7    /// <p>This name must be unique per region and can't be changed after creation.</p>
8    pub name: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon S3 bucket for the ca certificates bundle.</p>
10    pub ca_certificates_bundle_s3_bucket: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon S3 path for the ca certificates bundle.</p>
12    pub ca_certificates_bundle_s3_key: ::std::option::Option<::std::string::String>,
13    /// <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
14    pub ca_certificates_bundle_s3_object_version: ::std::option::Option<::std::string::String>,
15    /// <p>The tags to assign to the trust store.</p>
16    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
17}
18impl CreateTrustStoreInput {
19    /// <p>The name of the trust store.</p>
20    /// <p>This name must be unique per region and can't be changed after creation.</p>
21    pub fn name(&self) -> ::std::option::Option<&str> {
22        self.name.as_deref()
23    }
24    /// <p>The Amazon S3 bucket for the ca certificates bundle.</p>
25    pub fn ca_certificates_bundle_s3_bucket(&self) -> ::std::option::Option<&str> {
26        self.ca_certificates_bundle_s3_bucket.as_deref()
27    }
28    /// <p>The Amazon S3 path for the ca certificates bundle.</p>
29    pub fn ca_certificates_bundle_s3_key(&self) -> ::std::option::Option<&str> {
30        self.ca_certificates_bundle_s3_key.as_deref()
31    }
32    /// <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
33    pub fn ca_certificates_bundle_s3_object_version(&self) -> ::std::option::Option<&str> {
34        self.ca_certificates_bundle_s3_object_version.as_deref()
35    }
36    /// <p>The tags to assign to the trust store.</p>
37    ///
38    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
39    pub fn tags(&self) -> &[crate::types::Tag] {
40        self.tags.as_deref().unwrap_or_default()
41    }
42}
43impl CreateTrustStoreInput {
44    /// Creates a new builder-style object to manufacture [`CreateTrustStoreInput`](crate::operation::create_trust_store::CreateTrustStoreInput).
45    pub fn builder() -> crate::operation::create_trust_store::builders::CreateTrustStoreInputBuilder {
46        crate::operation::create_trust_store::builders::CreateTrustStoreInputBuilder::default()
47    }
48}
49
50/// A builder for [`CreateTrustStoreInput`](crate::operation::create_trust_store::CreateTrustStoreInput).
51#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
52#[non_exhaustive]
53pub struct CreateTrustStoreInputBuilder {
54    pub(crate) name: ::std::option::Option<::std::string::String>,
55    pub(crate) ca_certificates_bundle_s3_bucket: ::std::option::Option<::std::string::String>,
56    pub(crate) ca_certificates_bundle_s3_key: ::std::option::Option<::std::string::String>,
57    pub(crate) ca_certificates_bundle_s3_object_version: ::std::option::Option<::std::string::String>,
58    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
59}
60impl CreateTrustStoreInputBuilder {
61    /// <p>The name of the trust store.</p>
62    /// <p>This name must be unique per region and can't be changed after creation.</p>
63    /// This field is required.
64    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65        self.name = ::std::option::Option::Some(input.into());
66        self
67    }
68    /// <p>The name of the trust store.</p>
69    /// <p>This name must be unique per region and can't be changed after creation.</p>
70    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
71        self.name = input;
72        self
73    }
74    /// <p>The name of the trust store.</p>
75    /// <p>This name must be unique per region and can't be changed after creation.</p>
76    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
77        &self.name
78    }
79    /// <p>The Amazon S3 bucket for the ca certificates bundle.</p>
80    /// This field is required.
81    pub fn ca_certificates_bundle_s3_bucket(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
82        self.ca_certificates_bundle_s3_bucket = ::std::option::Option::Some(input.into());
83        self
84    }
85    /// <p>The Amazon S3 bucket for the ca certificates bundle.</p>
86    pub fn set_ca_certificates_bundle_s3_bucket(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
87        self.ca_certificates_bundle_s3_bucket = input;
88        self
89    }
90    /// <p>The Amazon S3 bucket for the ca certificates bundle.</p>
91    pub fn get_ca_certificates_bundle_s3_bucket(&self) -> &::std::option::Option<::std::string::String> {
92        &self.ca_certificates_bundle_s3_bucket
93    }
94    /// <p>The Amazon S3 path for the ca certificates bundle.</p>
95    /// This field is required.
96    pub fn ca_certificates_bundle_s3_key(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
97        self.ca_certificates_bundle_s3_key = ::std::option::Option::Some(input.into());
98        self
99    }
100    /// <p>The Amazon S3 path for the ca certificates bundle.</p>
101    pub fn set_ca_certificates_bundle_s3_key(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
102        self.ca_certificates_bundle_s3_key = input;
103        self
104    }
105    /// <p>The Amazon S3 path for the ca certificates bundle.</p>
106    pub fn get_ca_certificates_bundle_s3_key(&self) -> &::std::option::Option<::std::string::String> {
107        &self.ca_certificates_bundle_s3_key
108    }
109    /// <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
110    pub fn ca_certificates_bundle_s3_object_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
111        self.ca_certificates_bundle_s3_object_version = ::std::option::Option::Some(input.into());
112        self
113    }
114    /// <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
115    pub fn set_ca_certificates_bundle_s3_object_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
116        self.ca_certificates_bundle_s3_object_version = input;
117        self
118    }
119    /// <p>The Amazon S3 object version for the ca certificates bundle. If undefined the current version is used.</p>
120    pub fn get_ca_certificates_bundle_s3_object_version(&self) -> &::std::option::Option<::std::string::String> {
121        &self.ca_certificates_bundle_s3_object_version
122    }
123    /// Appends an item to `tags`.
124    ///
125    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
126    ///
127    /// <p>The tags to assign to the trust store.</p>
128    pub fn tags(mut self, input: crate::types::Tag) -> Self {
129        let mut v = self.tags.unwrap_or_default();
130        v.push(input);
131        self.tags = ::std::option::Option::Some(v);
132        self
133    }
134    /// <p>The tags to assign to the trust store.</p>
135    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
136        self.tags = input;
137        self
138    }
139    /// <p>The tags to assign to the trust store.</p>
140    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
141        &self.tags
142    }
143    /// Consumes the builder and constructs a [`CreateTrustStoreInput`](crate::operation::create_trust_store::CreateTrustStoreInput).
144    pub fn build(
145        self,
146    ) -> ::std::result::Result<crate::operation::create_trust_store::CreateTrustStoreInput, ::aws_smithy_types::error::operation::BuildError> {
147        ::std::result::Result::Ok(crate::operation::create_trust_store::CreateTrustStoreInput {
148            name: self.name,
149            ca_certificates_bundle_s3_bucket: self.ca_certificates_bundle_s3_bucket,
150            ca_certificates_bundle_s3_key: self.ca_certificates_bundle_s3_key,
151            ca_certificates_bundle_s3_object_version: self.ca_certificates_bundle_s3_object_version,
152            tags: self.tags,
153        })
154    }
155}