Skip to main content

aws_sdk_continuum/operation/update_integration/
_update_integration_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// Specifies the S3 integration and the credentials to validate and save.
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct UpdateIntegrationInput {
7    /// The unique identifier of the S3 integration to update.
8    pub integration_id: ::std::option::Option<::std::string::String>,
9    /// The provider-specific changes to apply. The member must match the integration's provider type, and only S3 integrations can be updated.
10    pub provider_configuration: ::std::option::Option<crate::types::UpdateProviderConfiguration>,
11}
12impl UpdateIntegrationInput {
13    /// The unique identifier of the S3 integration to update.
14    pub fn integration_id(&self) -> ::std::option::Option<&str> {
15        self.integration_id.as_deref()
16    }
17    /// The provider-specific changes to apply. The member must match the integration's provider type, and only S3 integrations can be updated.
18    pub fn provider_configuration(&self) -> ::std::option::Option<&crate::types::UpdateProviderConfiguration> {
19        self.provider_configuration.as_ref()
20    }
21}
22impl UpdateIntegrationInput {
23    /// Creates a new builder-style object to manufacture [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
24    pub fn builder() -> crate::operation::update_integration::builders::UpdateIntegrationInputBuilder {
25        crate::operation::update_integration::builders::UpdateIntegrationInputBuilder::default()
26    }
27}
28
29/// A builder for [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
30#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
31#[non_exhaustive]
32pub struct UpdateIntegrationInputBuilder {
33    pub(crate) integration_id: ::std::option::Option<::std::string::String>,
34    pub(crate) provider_configuration: ::std::option::Option<crate::types::UpdateProviderConfiguration>,
35}
36impl UpdateIntegrationInputBuilder {
37    /// The unique identifier of the S3 integration to update.
38    /// This field is required.
39    pub fn integration_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
40        self.integration_id = ::std::option::Option::Some(input.into());
41        self
42    }
43    /// The unique identifier of the S3 integration to update.
44    pub fn set_integration_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
45        self.integration_id = input;
46        self
47    }
48    /// The unique identifier of the S3 integration to update.
49    pub fn get_integration_id(&self) -> &::std::option::Option<::std::string::String> {
50        &self.integration_id
51    }
52    /// The provider-specific changes to apply. The member must match the integration's provider type, and only S3 integrations can be updated.
53    /// This field is required.
54    pub fn provider_configuration(mut self, input: crate::types::UpdateProviderConfiguration) -> Self {
55        self.provider_configuration = ::std::option::Option::Some(input);
56        self
57    }
58    /// The provider-specific changes to apply. The member must match the integration's provider type, and only S3 integrations can be updated.
59    pub fn set_provider_configuration(mut self, input: ::std::option::Option<crate::types::UpdateProviderConfiguration>) -> Self {
60        self.provider_configuration = input;
61        self
62    }
63    /// The provider-specific changes to apply. The member must match the integration's provider type, and only S3 integrations can be updated.
64    pub fn get_provider_configuration(&self) -> &::std::option::Option<crate::types::UpdateProviderConfiguration> {
65        &self.provider_configuration
66    }
67    /// Consumes the builder and constructs a [`UpdateIntegrationInput`](crate::operation::update_integration::UpdateIntegrationInput).
68    pub fn build(
69        self,
70    ) -> ::std::result::Result<crate::operation::update_integration::UpdateIntegrationInput, ::aws_smithy_types::error::operation::BuildError> {
71        ::std::result::Result::Ok(crate::operation::update_integration::UpdateIntegrationInput {
72            integration_id: self.integration_id,
73            provider_configuration: self.provider_configuration,
74        })
75    }
76}