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 GetIntegrationConfigurationOutput {
    /// <p>The name of the integration.</p>
    pub integration_name: ::std::string::String,
    /// <p>The Amazon Resource Name (ARN) of the integration.</p>
    pub integration_arn: ::std::string::String,
    /// <p>The ID of the integration type.</p>
    pub integration_type_id: ::std::string::String,
    /// <p>The resource configuration for the integration.</p>
    pub resource_configuration: ::std::option::Option<crate::types::ResourceConfiguration>,
    /// <p>The time at which the integration configuration was created. The value is in ISO-8601 format.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The time at which the integration configuration was last updated. The value is in ISO-8601 format.</p>
    pub updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The environment variables.</p>
    pub environment_variables: ::std::vec::Vec<crate::types::IntegrationEnvironmentVariable>,
    _request_id: Option<String>,
}
impl GetIntegrationConfigurationOutput {
    /// <p>The name of the integration.</p>
    pub fn integration_name(&self) -> &str {
        use std::ops::Deref;
        self.integration_name.deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p>
    pub fn integration_arn(&self) -> &str {
        use std::ops::Deref;
        self.integration_arn.deref()
    }
    /// <p>The ID of the integration type.</p>
    pub fn integration_type_id(&self) -> &str {
        use std::ops::Deref;
        self.integration_type_id.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 time at which the integration configuration was created. The value is in ISO-8601 format.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The time at which the integration configuration was last updated. The value is in ISO-8601 format.</p>
    pub fn updated_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.updated_at.as_ref()
    }
    /// <p>The environment variables.</p>
    pub fn environment_variables(&self) -> &[crate::types::IntegrationEnvironmentVariable] {
        use std::ops::Deref;
        self.environment_variables.deref()
    }
}
impl ::aws_types::request_id::RequestId for GetIntegrationConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetIntegrationConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`GetIntegrationConfigurationOutput`](crate::operation::get_integration_configuration::GetIntegrationConfigurationOutput).
    pub fn builder() -> crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder {
        crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::default()
    }
}

/// A builder for [`GetIntegrationConfigurationOutput`](crate::operation::get_integration_configuration::GetIntegrationConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetIntegrationConfigurationOutputBuilder {
    pub(crate) integration_name: ::std::option::Option<::std::string::String>,
    pub(crate) integration_arn: ::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) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) updated_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) environment_variables: ::std::option::Option<::std::vec::Vec<crate::types::IntegrationEnvironmentVariable>>,
    _request_id: Option<String>,
}
impl GetIntegrationConfigurationOutputBuilder {
    /// <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 Amazon Resource Name (ARN) of the integration.</p>
    /// This field is required.
    pub fn integration_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.integration_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p>
    pub fn set_integration_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.integration_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the integration.</p>
    pub fn get_integration_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.integration_arn
    }
    /// <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
    }
    /// <p>The time at which the integration configuration was created. The value is in ISO-8601 format.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the integration configuration was created. The value is in ISO-8601 format.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The time at which the integration configuration was created. The value is in ISO-8601 format.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The time at which the integration configuration was last updated. The value is in ISO-8601 format.</p>
    pub fn updated_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.updated_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The time at which the integration configuration was last updated. The value is in ISO-8601 format.</p>
    pub fn set_updated_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.updated_at = input;
        self
    }
    /// <p>The time at which the integration configuration was last updated. The value is in ISO-8601 format.</p>
    pub fn get_updated_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.updated_at
    }
    /// 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::IntegrationEnvironmentVariable) -> 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::IntegrationEnvironmentVariable>>) -> 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::IntegrationEnvironmentVariable>> {
        &self.environment_variables
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetIntegrationConfigurationOutput`](crate::operation::get_integration_configuration::GetIntegrationConfigurationOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`integration_name`](crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::integration_name)
    /// - [`integration_arn`](crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::integration_arn)
    /// - [`integration_type_id`](crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::integration_type_id)
    /// - [`created_at`](crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::created_at)
    /// - [`environment_variables`](crate::operation::get_integration_configuration::builders::GetIntegrationConfigurationOutputBuilder::environment_variables)
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::get_integration_configuration::GetIntegrationConfigurationOutput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::get_integration_configuration::GetIntegrationConfigurationOutput {
            integration_name: self.integration_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_name",
                    "integration_name was not specified but it is required when building GetIntegrationConfigurationOutput",
                )
            })?,
            integration_arn: self.integration_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_arn",
                    "integration_arn was not specified but it is required when building GetIntegrationConfigurationOutput",
                )
            })?,
            integration_type_id: self.integration_type_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "integration_type_id",
                    "integration_type_id was not specified but it is required when building GetIntegrationConfigurationOutput",
                )
            })?,
            resource_configuration: self.resource_configuration,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetIntegrationConfigurationOutput",
                )
            })?,
            updated_at: self.updated_at,
            environment_variables: self.environment_variables.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "environment_variables",
                    "environment_variables was not specified but it is required when building GetIntegrationConfigurationOutput",
                )
            })?,
            _request_id: self._request_id,
        })
    }
}