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 DeleteGitConnectionInput {
    /// <p>The Git provider.</p>
    pub provider: ::std::option::Option<crate::types::GitProvider>,
    /// <p>The account that the Git connection is for. The value depends on the provider:</p>
    /// <ul>
    /// <li>
    /// <p>For GitHub, specify the user or organization name.</p></li>
    /// <li>
    /// <p>For GitLab, specify the user name.</p></li>
    /// </ul>
    /// <p>To get this value, call ListGitConnections.</p>
    pub owner: ::std::option::Option<::std::string::String>,
}
impl DeleteGitConnectionInput {
    /// <p>The Git provider.</p>
    pub fn provider(&self) -> ::std::option::Option<&crate::types::GitProvider> {
        self.provider.as_ref()
    }
    /// <p>The account that the Git connection is for. The value depends on the provider:</p>
    /// <ul>
    /// <li>
    /// <p>For GitHub, specify the user or organization name.</p></li>
    /// <li>
    /// <p>For GitLab, specify the user name.</p></li>
    /// </ul>
    /// <p>To get this value, call ListGitConnections.</p>
    pub fn owner(&self) -> ::std::option::Option<&str> {
        self.owner.as_deref()
    }
}
impl DeleteGitConnectionInput {
    /// Creates a new builder-style object to manufacture [`DeleteGitConnectionInput`](crate::operation::delete_git_connection::DeleteGitConnectionInput).
    pub fn builder() -> crate::operation::delete_git_connection::builders::DeleteGitConnectionInputBuilder {
        crate::operation::delete_git_connection::builders::DeleteGitConnectionInputBuilder::default()
    }
}

/// A builder for [`DeleteGitConnectionInput`](crate::operation::delete_git_connection::DeleteGitConnectionInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeleteGitConnectionInputBuilder {
    pub(crate) provider: ::std::option::Option<crate::types::GitProvider>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
}
impl DeleteGitConnectionInputBuilder {
    /// <p>The Git provider.</p>
    /// This field is required.
    pub fn provider(mut self, input: crate::types::GitProvider) -> Self {
        self.provider = ::std::option::Option::Some(input);
        self
    }
    /// <p>The Git provider.</p>
    pub fn set_provider(mut self, input: ::std::option::Option<crate::types::GitProvider>) -> Self {
        self.provider = input;
        self
    }
    /// <p>The Git provider.</p>
    pub fn get_provider(&self) -> &::std::option::Option<crate::types::GitProvider> {
        &self.provider
    }
    /// <p>The account that the Git connection is for. The value depends on the provider:</p>
    /// <ul>
    /// <li>
    /// <p>For GitHub, specify the user or organization name.</p></li>
    /// <li>
    /// <p>For GitLab, specify the user name.</p></li>
    /// </ul>
    /// <p>To get this value, call ListGitConnections.</p>
    /// This field is required.
    pub fn owner(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.owner = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The account that the Git connection is for. The value depends on the provider:</p>
    /// <ul>
    /// <li>
    /// <p>For GitHub, specify the user or organization name.</p></li>
    /// <li>
    /// <p>For GitLab, specify the user name.</p></li>
    /// </ul>
    /// <p>To get this value, call ListGitConnections.</p>
    pub fn set_owner(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.owner = input;
        self
    }
    /// <p>The account that the Git connection is for. The value depends on the provider:</p>
    /// <ul>
    /// <li>
    /// <p>For GitHub, specify the user or organization name.</p></li>
    /// <li>
    /// <p>For GitLab, specify the user name.</p></li>
    /// </ul>
    /// <p>To get this value, call ListGitConnections.</p>
    pub fn get_owner(&self) -> &::std::option::Option<::std::string::String> {
        &self.owner
    }
    /// Consumes the builder and constructs a [`DeleteGitConnectionInput`](crate::operation::delete_git_connection::DeleteGitConnectionInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::delete_git_connection::DeleteGitConnectionInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::delete_git_connection::DeleteGitConnectionInput {
            provider: self.provider,
            owner: self.owner,
        })
    }
}