aws-sdk-codecommit 1.99.0

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

/// <p>Returns information about a file in a repository.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct File {
    /// <p>The blob ID that contains the file information.</p>
    pub blob_id: ::std::option::Option<::std::string::String>,
    /// <p>The fully qualified path to the file in the repository.</p>
    pub absolute_path: ::std::option::Option<::std::string::String>,
    /// <p>The relative path of the file from the folder where the query originated.</p>
    pub relative_path: ::std::option::Option<::std::string::String>,
    /// <p>The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.</p>
    pub file_mode: ::std::option::Option<crate::types::FileModeTypeEnum>,
}
impl File {
    /// <p>The blob ID that contains the file information.</p>
    pub fn blob_id(&self) -> ::std::option::Option<&str> {
        self.blob_id.as_deref()
    }
    /// <p>The fully qualified path to the file in the repository.</p>
    pub fn absolute_path(&self) -> ::std::option::Option<&str> {
        self.absolute_path.as_deref()
    }
    /// <p>The relative path of the file from the folder where the query originated.</p>
    pub fn relative_path(&self) -> ::std::option::Option<&str> {
        self.relative_path.as_deref()
    }
    /// <p>The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.</p>
    pub fn file_mode(&self) -> ::std::option::Option<&crate::types::FileModeTypeEnum> {
        self.file_mode.as_ref()
    }
}
impl File {
    /// Creates a new builder-style object to manufacture [`File`](crate::types::File).
    pub fn builder() -> crate::types::builders::FileBuilder {
        crate::types::builders::FileBuilder::default()
    }
}

/// A builder for [`File`](crate::types::File).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct FileBuilder {
    pub(crate) blob_id: ::std::option::Option<::std::string::String>,
    pub(crate) absolute_path: ::std::option::Option<::std::string::String>,
    pub(crate) relative_path: ::std::option::Option<::std::string::String>,
    pub(crate) file_mode: ::std::option::Option<crate::types::FileModeTypeEnum>,
}
impl FileBuilder {
    /// <p>The blob ID that contains the file information.</p>
    pub fn blob_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.blob_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The blob ID that contains the file information.</p>
    pub fn set_blob_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.blob_id = input;
        self
    }
    /// <p>The blob ID that contains the file information.</p>
    pub fn get_blob_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.blob_id
    }
    /// <p>The fully qualified path to the file in the repository.</p>
    pub fn absolute_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.absolute_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fully qualified path to the file in the repository.</p>
    pub fn set_absolute_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.absolute_path = input;
        self
    }
    /// <p>The fully qualified path to the file in the repository.</p>
    pub fn get_absolute_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.absolute_path
    }
    /// <p>The relative path of the file from the folder where the query originated.</p>
    pub fn relative_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.relative_path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The relative path of the file from the folder where the query originated.</p>
    pub fn set_relative_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.relative_path = input;
        self
    }
    /// <p>The relative path of the file from the folder where the query originated.</p>
    pub fn get_relative_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.relative_path
    }
    /// <p>The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.</p>
    pub fn file_mode(mut self, input: crate::types::FileModeTypeEnum) -> Self {
        self.file_mode = ::std::option::Option::Some(input);
        self
    }
    /// <p>The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.</p>
    pub fn set_file_mode(mut self, input: ::std::option::Option<crate::types::FileModeTypeEnum>) -> Self {
        self.file_mode = input;
        self
    }
    /// <p>The extrapolated file mode permissions for the file. Valid values include EXECUTABLE and NORMAL.</p>
    pub fn get_file_mode(&self) -> &::std::option::Option<crate::types::FileModeTypeEnum> {
        &self.file_mode
    }
    /// Consumes the builder and constructs a [`File`](crate::types::File).
    pub fn build(self) -> crate::types::File {
        crate::types::File {
            blob_id: self.blob_id,
            absolute_path: self.absolute_path,
            relative_path: self.relative_path,
            file_mode: self.file_mode,
        }
    }
}