aws-sdk-amplifygen3 1.0.0

AWS SDK for AWS Amplify Gen 3
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateIntegrationConfigurationInput {
    /// <p>The name of the integration.</p>
    pub integration_name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the integration type.</p>
    pub integration_type_id: ::std::option::Option<::std::string::String>,
    /// <p>The resource configuration for the integration.</p>
    pub resource_configuration: ::std::option::Option<crate::types::ResourceConfiguration>,
    /// <p>The environment variables.</p>
    pub environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>>,
    /// <p>The keys of the environment variables to remove.</p>
    pub remove_environment_variable_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateIntegrationConfigurationInput {
    /// <p>The name of the integration.</p>
    pub fn integration_name(&self) -> ::std::option::Option<&str> {
        self.integration_name.as_deref()
    }
    /// <p>The ID of the integration type.</p>
    pub fn integration_type_id(&self) -> ::std::option::Option<&str> {
        self.integration_type_id.as_deref()
    }
    /// <p>The resource configuration for the integration.</p>
    pub fn resource_configuration(&self) -> ::std::option::Option<&crate::types::ResourceConfiguration> {
        self.resource_configuration.as_ref()
    }
    /// <p>The environment variables.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.environment_variables.is_none()`.
    pub fn environment_variables(&self) -> &[crate::types::IntegrationEnvironmentVariableInput] {
        self.environment_variables.as_deref().unwrap_or_default()
    }
    /// <p>The keys of the environment variables to remove.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.remove_environment_variable_keys.is_none()`.
    pub fn remove_environment_variable_keys(&self) -> &[::std::string::String] {
        self.remove_environment_variable_keys.as_deref().unwrap_or_default()
    }
}
impl UpdateIntegrationConfigurationInput {
    /// Creates a new builder-style object to manufacture [`UpdateIntegrationConfigurationInput`](crate::operation::update_integration_configuration::UpdateIntegrationConfigurationInput).
    pub fn builder() -> crate::operation::update_integration_configuration::builders::UpdateIntegrationConfigurationInputBuilder {
        crate::operation::update_integration_configuration::builders::UpdateIntegrationConfigurationInputBuilder::default()
    }
}

/// A builder for [`UpdateIntegrationConfigurationInput`](crate::operation::update_integration_configuration::UpdateIntegrationConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateIntegrationConfigurationInputBuilder {
    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
    pub(crate) integration_type_id: ::std::option::Option<::std::string::String>,
    pub(crate) resource_configuration: ::std::option::Option<crate::types::ResourceConfiguration>,
    pub(crate) environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>>,
    pub(crate) remove_environment_variable_keys: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl UpdateIntegrationConfigurationInputBuilder {
    /// <p>The name of the integration.</p>
    /// This field is required.
    pub fn integration_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the integration.</p>
    pub fn set_integration_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_name = input;
        self
    }
    /// <p>The name of the integration.</p>
    pub fn get_integration_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_name
    }
    /// <p>The ID of the integration type.</p>
    pub fn integration_type_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_type_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the integration type.</p>
    pub fn set_integration_type_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_type_id = input;
        self
    }
    /// <p>The ID of the integration type.</p>
    pub fn get_integration_type_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_type_id
    }
    /// <p>The resource configuration for the integration.</p>
    pub fn resource_configuration(mut self, input: crate::types::ResourceConfiguration) -> Self {
        self.resource_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The resource configuration for the integration.</p>
    pub fn set_resource_configuration(mut self, input: ::std::option::Option<crate::types::ResourceConfiguration>) -> Self {
        self.resource_configuration = input;
        self
    }
    /// <p>The resource configuration for the integration.</p>
    pub fn get_resource_configuration(&self) -> &::std::option::Option<crate::types::ResourceConfiguration> {
        &self.resource_configuration
    }
    /// Appends an item to `environment_variables`.
    ///
    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
    ///
    /// <p>The environment variables.</p>
    pub fn environment_variables(mut self, input: crate::types::IntegrationEnvironmentVariableInput) -> Self {
        let mut v = self.environment_variables.unwrap_or_default();
        v.push(input);
        self.environment_variables = ::std::option::Option::Some(v);
        self
    }
    /// <p>The environment variables.</p>
    pub fn set_environment_variables(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>>,
    ) -> Self {
        self.environment_variables = input;
        self
    }
    /// <p>The environment variables.</p>
    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>> {
        &self.environment_variables
    }
    /// Appends an item to `remove_environment_variable_keys`.
    ///
    /// To override the contents of this collection use [`set_remove_environment_variable_keys`](Self::set_remove_environment_variable_keys).
    ///
    /// <p>The keys of the environment variables to remove.</p>
    pub fn remove_environment_variable_keys(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.remove_environment_variable_keys.unwrap_or_default();
        v.push(input.into());
        self.remove_environment_variable_keys = ::std::option::Option::Some(v);
        self
    }
    /// <p>The keys of the environment variables to remove.</p>
    pub fn set_remove_environment_variable_keys(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.remove_environment_variable_keys = input;
        self
    }
    /// <p>The keys of the environment variables to remove.</p>
    pub fn get_remove_environment_variable_keys(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.remove_environment_variable_keys
    }
    /// Consumes the builder and constructs a [`UpdateIntegrationConfigurationInput`](crate::operation::update_integration_configuration::UpdateIntegrationConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_integration_configuration::UpdateIntegrationConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_integration_configuration::UpdateIntegrationConfigurationInput {
            integration_name: self.integration_name,
            integration_type_id: self.integration_type_id,
            resource_configuration: self.resource_configuration,
            environment_variables: self.environment_variables,
            remove_environment_variable_keys: self.remove_environment_variable_keys,
        })
    }
}