aws-sdk-apprunner 1.99.0

AWS SDK for AWS App Runner
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes an App Runner connection resource.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Connection {
    /// <p>The customer-provided connection name.</p>
    pub connection_name: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of this connection.</p>
    pub connection_arn: ::std::option::Option<::std::string::String>,
    /// <p>The source repository provider.</p>
    pub provider_type: ::std::option::Option<crate::types::ProviderType>,
    /// <p>The current state of the App Runner connection. When the state is <code>AVAILABLE</code>, you can use the connection to create an App Runner service.</p>
    pub status: ::std::option::Option<crate::types::ConnectionStatus>,
    /// <p>The App Runner connection creation time, expressed as a Unix time stamp.</p>
    pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl Connection {
    /// <p>The customer-provided connection name.</p>
    pub fn connection_name(&self) -> ::std::option::Option<&str> {
        self.connection_name.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of this connection.</p>
    pub fn connection_arn(&self) -> ::std::option::Option<&str> {
        self.connection_arn.as_deref()
    }
    /// <p>The source repository provider.</p>
    pub fn provider_type(&self) -> ::std::option::Option<&crate::types::ProviderType> {
        self.provider_type.as_ref()
    }
    /// <p>The current state of the App Runner connection. When the state is <code>AVAILABLE</code>, you can use the connection to create an App Runner service.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ConnectionStatus> {
        self.status.as_ref()
    }
    /// <p>The App Runner connection creation time, expressed as a Unix time stamp.</p>
    pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.created_at.as_ref()
    }
}
impl Connection {
    /// Creates a new builder-style object to manufacture [`Connection`](crate::types::Connection).
    pub fn builder() -> crate::types::builders::ConnectionBuilder {
        crate::types::builders::ConnectionBuilder::default()
    }
}

/// A builder for [`Connection`](crate::types::Connection).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConnectionBuilder {
    pub(crate) connection_name: ::std::option::Option<::std::string::String>,
    pub(crate) connection_arn: ::std::option::Option<::std::string::String>,
    pub(crate) provider_type: ::std::option::Option<crate::types::ProviderType>,
    pub(crate) status: ::std::option::Option<crate::types::ConnectionStatus>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
}
impl ConnectionBuilder {
    /// <p>The customer-provided connection name.</p>
    pub fn connection_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The customer-provided connection name.</p>
    pub fn set_connection_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_name = input;
        self
    }
    /// <p>The customer-provided connection name.</p>
    pub fn get_connection_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_name
    }
    /// <p>The Amazon Resource Name (ARN) of this connection.</p>
    pub fn connection_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of this connection.</p>
    pub fn set_connection_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of this connection.</p>
    pub fn get_connection_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_arn
    }
    /// <p>The source repository provider.</p>
    pub fn provider_type(mut self, input: crate::types::ProviderType) -> Self {
        self.provider_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source repository provider.</p>
    pub fn set_provider_type(mut self, input: ::std::option::Option<crate::types::ProviderType>) -> Self {
        self.provider_type = input;
        self
    }
    /// <p>The source repository provider.</p>
    pub fn get_provider_type(&self) -> &::std::option::Option<crate::types::ProviderType> {
        &self.provider_type
    }
    /// <p>The current state of the App Runner connection. When the state is <code>AVAILABLE</code>, you can use the connection to create an App Runner service.</p>
    pub fn status(mut self, input: crate::types::ConnectionStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current state of the App Runner connection. When the state is <code>AVAILABLE</code>, you can use the connection to create an App Runner service.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ConnectionStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current state of the App Runner connection. When the state is <code>AVAILABLE</code>, you can use the connection to create an App Runner service.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ConnectionStatus> {
        &self.status
    }
    /// <p>The App Runner connection creation time, expressed as a Unix time stamp.</p>
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The App Runner connection creation time, expressed as a Unix time stamp.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The App Runner connection creation time, expressed as a Unix time stamp.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// Consumes the builder and constructs a [`Connection`](crate::types::Connection).
    pub fn build(self) -> crate::types::Connection {
        crate::types::Connection {
            connection_name: self.connection_name,
            connection_arn: self.connection_arn,
            provider_type: self.provider_type,
            status: self.status,
            created_at: self.created_at,
        }
    }
}