aws_sdk_apprunner/operation/create_connection/
_create_connection_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateConnectionInput {
6 pub connection_name: ::std::option::Option<::std::string::String>,
8 pub provider_type: ::std::option::Option<crate::types::ProviderType>,
10 pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
12}
13impl CreateConnectionInput {
14 pub fn connection_name(&self) -> ::std::option::Option<&str> {
16 self.connection_name.as_deref()
17 }
18 pub fn provider_type(&self) -> ::std::option::Option<&crate::types::ProviderType> {
20 self.provider_type.as_ref()
21 }
22 pub fn tags(&self) -> &[crate::types::Tag] {
26 self.tags.as_deref().unwrap_or_default()
27 }
28}
29impl CreateConnectionInput {
30 pub fn builder() -> crate::operation::create_connection::builders::CreateConnectionInputBuilder {
32 crate::operation::create_connection::builders::CreateConnectionInputBuilder::default()
33 }
34}
35
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
38#[non_exhaustive]
39pub struct CreateConnectionInputBuilder {
40 pub(crate) connection_name: ::std::option::Option<::std::string::String>,
41 pub(crate) provider_type: ::std::option::Option<crate::types::ProviderType>,
42 pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
43}
44impl CreateConnectionInputBuilder {
45 pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
48 self.connection_name = ::std::option::Option::Some(input.into());
49 self
50 }
51 pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
53 self.connection_name = input;
54 self
55 }
56 pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
58 &self.connection_name
59 }
60 pub fn provider_type(mut self, input: crate::types::ProviderType) -> Self {
63 self.provider_type = ::std::option::Option::Some(input);
64 self
65 }
66 pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ProviderType>) -> Self {
68 self.provider_type = input;
69 self
70 }
71 pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ProviderType> {
73 &self.provider_type
74 }
75 pub fn tags(mut self, input: crate::types::Tag) -> Self {
81 let mut v = self.tags.unwrap_or_default();
82 v.push(input);
83 self.tags = ::std::option::Option::Some(v);
84 self
85 }
86 pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
88 self.tags = input;
89 self
90 }
91 pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
93 &self.tags
94 }
95 pub fn build(
97 self,
98 ) -> ::std::result::Result<crate::operation::create_connection::CreateConnectionInput, ::aws_smithy_types::error::operation::BuildError> {
99 ::std::result::Result::Ok(crate::operation::create_connection::CreateConnectionInput {
100 connection_name: self.connection_name,
101 provider_type: self.provider_type,
102 tags: self.tags,
103 })
104 }
105}