aws_sdk_continuum/operation/create_integration/_create_integration_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Specifies the provider configuration and name for the new integration.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CreateIntegrationInput {
7 /// An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
8 pub client_token: ::std::option::Option<::std::string::String>,
9 /// The name for the integration.
10 pub name: ::std::option::Option<::std::string::String>,
11 /// The provider-specific configuration required to create the integration. Only one member may be specified.
12 pub provider_configuration: ::std::option::Option<crate::types::ProviderConfiguration>,
13}
14impl CreateIntegrationInput {
15 /// An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
16 pub fn client_token(&self) -> ::std::option::Option<&str> {
17 self.client_token.as_deref()
18 }
19 /// The name for the integration.
20 pub fn name(&self) -> ::std::option::Option<&str> {
21 self.name.as_deref()
22 }
23 /// The provider-specific configuration required to create the integration. Only one member may be specified.
24 pub fn provider_configuration(&self) -> ::std::option::Option<&crate::types::ProviderConfiguration> {
25 self.provider_configuration.as_ref()
26 }
27}
28impl CreateIntegrationInput {
29 /// Creates a new builder-style object to manufacture [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
30 pub fn builder() -> crate::operation::create_integration::builders::CreateIntegrationInputBuilder {
31 crate::operation::create_integration::builders::CreateIntegrationInputBuilder::default()
32 }
33}
34
35/// A builder for [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CreateIntegrationInputBuilder {
39 pub(crate) client_token: ::std::option::Option<::std::string::String>,
40 pub(crate) name: ::std::option::Option<::std::string::String>,
41 pub(crate) provider_configuration: ::std::option::Option<crate::types::ProviderConfiguration>,
42}
43impl CreateIntegrationInputBuilder {
44 /// An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
45 pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.client_token = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
50 pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.client_token = input;
52 self
53 }
54 /// An optional token identifying one create attempt within the caller's account, Region, and operation. SDKs generate a token when omitted. If a request reaches the service without a token, the service generates one for that request. Each request without a token starts a new attempt. To replay an attempt, supply the same token and identical input. Authorized users and roles in the same account can retry an attempt this way. Token records are retained for eight hours after success or terminal failure, including after deletion of a successfully created integration. Different input with the same token returns ValidationException.
55 pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
56 &self.client_token
57 }
58 /// The name for the integration.
59 /// This field is required.
60 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61 self.name = ::std::option::Option::Some(input.into());
62 self
63 }
64 /// The name for the integration.
65 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66 self.name = input;
67 self
68 }
69 /// The name for the integration.
70 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
71 &self.name
72 }
73 /// The provider-specific configuration required to create the integration. Only one member may be specified.
74 /// This field is required.
75 pub fn provider_configuration(mut self, input: crate::types::ProviderConfiguration) -> Self {
76 self.provider_configuration = ::std::option::Option::Some(input);
77 self
78 }
79 /// The provider-specific configuration required to create the integration. Only one member may be specified.
80 pub fn set_provider_configuration(mut self, input: ::std::option::Option<crate::types::ProviderConfiguration>) -> Self {
81 self.provider_configuration = input;
82 self
83 }
84 /// The provider-specific configuration required to create the integration. Only one member may be specified.
85 pub fn get_provider_configuration(&self) -> &::std::option::Option<crate::types::ProviderConfiguration> {
86 &self.provider_configuration
87 }
88 /// Consumes the builder and constructs a [`CreateIntegrationInput`](crate::operation::create_integration::CreateIntegrationInput).
89 pub fn build(
90 self,
91 ) -> ::std::result::Result<crate::operation::create_integration::CreateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
92 ::std::result::Result::Ok(crate::operation::create_integration::CreateIntegrationInput {
93 client_token: self.client_token,
94 name: self.name,
95 provider_configuration: self.provider_configuration,
96 })
97 }
98}