aws-sdk-assurance 1.0.0

AWS SDK for AWS Assurance
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 DeleteEnvironmentConnectionInput {
    /// <p>The ARN of this governance environment.</p>
    pub environment_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the GitHub or SharePoint connection to delete, as returned by <code>ListEnvironmentConnections</code>. An Amazon S3 connection has no ID. To delete one, use <code>providerConfig</code>.</p>
    /// <p>Specify either <code>connectionId</code> or <code>providerConfig</code>, but not both.</p>
    pub connection_id: ::std::option::Option<::std::string::String>,
    /// <p>The connection to delete, identified by the source that it connects to.</p>
    pub provider_config: ::std::option::Option<crate::types::ConnectionProviderKey>,
}
impl DeleteEnvironmentConnectionInput {
    /// <p>The ARN of this governance environment.</p>
    pub fn environment_arn(&self) -> ::std::option::Option<&str> {
        self.environment_arn.as_deref()
    }
    /// <p>The ID of the GitHub or SharePoint connection to delete, as returned by <code>ListEnvironmentConnections</code>. An Amazon S3 connection has no ID. To delete one, use <code>providerConfig</code>.</p>
    /// <p>Specify either <code>connectionId</code> or <code>providerConfig</code>, but not both.</p>
    pub fn connection_id(&self) -> ::std::option::Option<&str> {
        self.connection_id.as_deref()
    }
    /// <p>The connection to delete, identified by the source that it connects to.</p>
    pub fn provider_config(&self) -> ::std::option::Option<&crate::types::ConnectionProviderKey> {
        self.provider_config.as_ref()
    }
}
impl DeleteEnvironmentConnectionInput {
    /// Creates a new builder-style object to manufacture [`DeleteEnvironmentConnectionInput`](crate::operation::delete_environment_connection::DeleteEnvironmentConnectionInput).
    pub fn builder() -> crate::operation::delete_environment_connection::builders::DeleteEnvironmentConnectionInputBuilder {
        crate::operation::delete_environment_connection::builders::DeleteEnvironmentConnectionInputBuilder::default()
    }
}

/// A builder for [`DeleteEnvironmentConnectionInput`](crate::operation::delete_environment_connection::DeleteEnvironmentConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteEnvironmentConnectionInputBuilder {
    pub(crate) environment_arn: ::std::option::Option<::std::string::String>,
    pub(crate) connection_id: ::std::option::Option<::std::string::String>,
    pub(crate) provider_config: ::std::option::Option<crate::types::ConnectionProviderKey>,
}
impl DeleteEnvironmentConnectionInputBuilder {
    /// <p>The ARN of this governance environment.</p>
    /// This field is required.
    pub fn environment_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.environment_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of this governance environment.</p>
    pub fn set_environment_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.environment_arn = input;
        self
    }
    /// <p>The ARN of this governance environment.</p>
    pub fn get_environment_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.environment_arn
    }
    /// <p>The ID of the GitHub or SharePoint connection to delete, as returned by <code>ListEnvironmentConnections</code>. An Amazon S3 connection has no ID. To delete one, use <code>providerConfig</code>.</p>
    /// <p>Specify either <code>connectionId</code> or <code>providerConfig</code>, but not both.</p>
    pub fn connection_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.connection_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the GitHub or SharePoint connection to delete, as returned by <code>ListEnvironmentConnections</code>. An Amazon S3 connection has no ID. To delete one, use <code>providerConfig</code>.</p>
    /// <p>Specify either <code>connectionId</code> or <code>providerConfig</code>, but not both.</p>
    pub fn set_connection_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.connection_id = input;
        self
    }
    /// <p>The ID of the GitHub or SharePoint connection to delete, as returned by <code>ListEnvironmentConnections</code>. An Amazon S3 connection has no ID. To delete one, use <code>providerConfig</code>.</p>
    /// <p>Specify either <code>connectionId</code> or <code>providerConfig</code>, but not both.</p>
    pub fn get_connection_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.connection_id
    }
    /// <p>The connection to delete, identified by the source that it connects to.</p>
    pub fn provider_config(mut self, input: crate::types::ConnectionProviderKey) -> Self {
        self.provider_config = ::std::option::Option::Some(input);
        self
    }
    /// <p>The connection to delete, identified by the source that it connects to.</p>
    pub fn set_provider_config(mut self, input: ::std::option::Option<crate::types::ConnectionProviderKey>) -> Self {
        self.provider_config = input;
        self
    }
    /// <p>The connection to delete, identified by the source that it connects to.</p>
    pub fn get_provider_config(&self) -> &::std::option::Option<crate::types::ConnectionProviderKey> {
        &self.provider_config
    }
    /// Consumes the builder and constructs a [`DeleteEnvironmentConnectionInput`](crate::operation::delete_environment_connection::DeleteEnvironmentConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::delete_environment_connection::DeleteEnvironmentConnectionInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::delete_environment_connection::DeleteEnvironmentConnectionInput {
            environment_arn: self.environment_arn,
            connection_id: self.connection_id,
            provider_config: self.provider_config,
        })
    }
}