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 GetFolderInput {
    /// <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>,
    /// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
    pub repository_name: ::std::option::Option<::std::string::String>,
    /// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
    pub repository_path: ::std::option::Option<::std::string::String>,
    /// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
    pub folder_path: ::std::option::Option<::std::string::String>,
    /// <p>The name of the branch to read from.</p>
    pub branch: ::std::option::Option<::std::string::String>,
}
impl GetFolderInput {
    /// <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()
    }
    /// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
    pub fn repository_name(&self) -> ::std::option::Option<&str> {
        self.repository_name.as_deref()
    }
    /// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
    pub fn repository_path(&self) -> ::std::option::Option<&str> {
        self.repository_path.as_deref()
    }
    /// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
    pub fn folder_path(&self) -> ::std::option::Option<&str> {
        self.folder_path.as_deref()
    }
    /// <p>The name of the branch to read from.</p>
    pub fn branch(&self) -> ::std::option::Option<&str> {
        self.branch.as_deref()
    }
}
impl GetFolderInput {
    /// Creates a new builder-style object to manufacture [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
    pub fn builder() -> crate::operation::get_folder::builders::GetFolderInputBuilder {
        crate::operation::get_folder::builders::GetFolderInputBuilder::default()
    }
}

/// A builder for [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetFolderInputBuilder {
    pub(crate) provider: ::std::option::Option<crate::types::GitProvider>,
    pub(crate) owner: ::std::option::Option<::std::string::String>,
    pub(crate) repository_name: ::std::option::Option<::std::string::String>,
    pub(crate) repository_path: ::std::option::Option<::std::string::String>,
    pub(crate) folder_path: ::std::option::Option<::std::string::String>,
    pub(crate) branch: ::std::option::Option<::std::string::String>,
}
impl GetFolderInputBuilder {
    /// <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
    }
    /// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
    pub fn repository_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
    pub fn set_repository_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_name = input;
        self
    }
    /// <p>The name of the repository, which is the last segment of RepositoryPath.</p>
    pub fn get_repository_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_name
    }
    /// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
    /// This field is required.
    pub fn repository_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.repository_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
    pub fn set_repository_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.repository_path = input;
        self
    }
    /// <p>The full path of the repository in the Git provider, for example my-org/my-app. GitLab paths can include subgroups, for example my-group/subgroup/my-app. To get this value, call ListRepositories.</p>
    pub fn get_repository_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.repository_path
    }
    /// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
    /// This field is required.
    pub fn folder_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.folder_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
    pub fn set_folder_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.folder_path = input;
        self
    }
    /// <p>The path of the folder, relative to the root of the repository, for example src/app. To list the root of the repository, use /.</p>
    pub fn get_folder_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.folder_path
    }
    /// <p>The name of the branch to read from.</p>
    /// This field is required.
    pub fn branch(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.branch = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the branch to read from.</p>
    pub fn set_branch(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.branch = input;
        self
    }
    /// <p>The name of the branch to read from.</p>
    pub fn get_branch(&self) -> &::std::option::Option<::std::string::String> {
        &self.branch
    }
    /// Consumes the builder and constructs a [`GetFolderInput`](crate::operation::get_folder::GetFolderInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::get_folder::GetFolderInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_folder::GetFolderInput {
            provider: self.provider,
            owner: self.owner,
            repository_name: self.repository_name,
            repository_path: self.repository_path,
            folder_path: self.folder_path,
            branch: self.branch,
        })
    }
}