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 CreateIntegrationConfigurationInput {
    /// <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 tags to apply to the resource.</p>
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The environment variables.</p>
    pub environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>>,
}
impl CreateIntegrationConfigurationInput {
    /// <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 tags to apply to the resource.</p>
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.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()
    }
}
impl CreateIntegrationConfigurationInput {
    /// Creates a new builder-style object to manufacture [`CreateIntegrationConfigurationInput`](crate::operation::create_integration_configuration::CreateIntegrationConfigurationInput).
    pub fn builder() -> crate::operation::create_integration_configuration::builders::CreateIntegrationConfigurationInputBuilder {
        crate::operation::create_integration_configuration::builders::CreateIntegrationConfigurationInputBuilder::default()
    }
}

/// A builder for [`CreateIntegrationConfigurationInput`](crate::operation::create_integration_configuration::CreateIntegrationConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateIntegrationConfigurationInputBuilder {
    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) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariableInput>>,
}
impl CreateIntegrationConfigurationInputBuilder {
    /// <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>
    /// This field is required.
    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
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The tags to apply to the resource.</p>
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The tags to apply to the resource.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// 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
    }
    /// Consumes the builder and constructs a [`CreateIntegrationConfigurationInput`](crate::operation::create_integration_configuration::CreateIntegrationConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_integration_configuration::CreateIntegrationConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::create_integration_configuration::CreateIntegrationConfigurationInput {
            integration_name: self.integration_name,
            integration_type_id: self.integration_type_id,
            resource_configuration: self.resource_configuration,
            tags: self.tags,
            environment_variables: self.environment_variables,
        })
    }
}