aws-sdk-devopsagent 1.9.0

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

/// <p>Request structure for getting an asset file</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetAssetFileInput {
    /// <p>The unique identifier for the agent space containing the asset</p>
    pub agent_space_id: ::std::option::Option<::std::string::String>,
    /// <p>The unique identifier of the asset containing the file</p>
    pub asset_id: ::std::option::Option<::std::string::String>,
    /// <p>The path of the file within the asset to retrieve</p>
    pub path: ::std::option::Option<::std::string::String>,
    /// <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
    pub asset_version: ::std::option::Option<i32>,
}
impl GetAssetFileInput {
    /// <p>The unique identifier for the agent space containing the asset</p>
    pub fn agent_space_id(&self) -> ::std::option::Option<&str> {
        self.agent_space_id.as_deref()
    }
    /// <p>The unique identifier of the asset containing the file</p>
    pub fn asset_id(&self) -> ::std::option::Option<&str> {
        self.asset_id.as_deref()
    }
    /// <p>The path of the file within the asset to retrieve</p>
    pub fn path(&self) -> ::std::option::Option<&str> {
        self.path.as_deref()
    }
    /// <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
    pub fn asset_version(&self) -> ::std::option::Option<i32> {
        self.asset_version
    }
}
impl GetAssetFileInput {
    /// Creates a new builder-style object to manufacture [`GetAssetFileInput`](crate::operation::get_asset_file::GetAssetFileInput).
    pub fn builder() -> crate::operation::get_asset_file::builders::GetAssetFileInputBuilder {
        crate::operation::get_asset_file::builders::GetAssetFileInputBuilder::default()
    }
}

/// A builder for [`GetAssetFileInput`](crate::operation::get_asset_file::GetAssetFileInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetAssetFileInputBuilder {
    pub(crate) agent_space_id: ::std::option::Option<::std::string::String>,
    pub(crate) asset_id: ::std::option::Option<::std::string::String>,
    pub(crate) path: ::std::option::Option<::std::string::String>,
    pub(crate) asset_version: ::std::option::Option<i32>,
}
impl GetAssetFileInputBuilder {
    /// <p>The unique identifier for the agent space containing the asset</p>
    /// This field is required.
    pub fn agent_space_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.agent_space_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the agent space containing the asset</p>
    pub fn set_agent_space_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.agent_space_id = input;
        self
    }
    /// <p>The unique identifier for the agent space containing the asset</p>
    pub fn get_agent_space_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.agent_space_id
    }
    /// <p>The unique identifier of the asset containing the file</p>
    /// This field is required.
    pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.asset_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier of the asset containing the file</p>
    pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.asset_id = input;
        self
    }
    /// <p>The unique identifier of the asset containing the file</p>
    pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.asset_id
    }
    /// <p>The path of the file within the asset to retrieve</p>
    /// This field is required.
    pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.path = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The path of the file within the asset to retrieve</p>
    pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.path = input;
        self
    }
    /// <p>The path of the file within the asset to retrieve</p>
    pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
        &self.path
    }
    /// <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
    pub fn asset_version(mut self, input: i32) -> Self {
        self.asset_version = ::std::option::Option::Some(input);
        self
    }
    /// <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
    pub fn set_asset_version(mut self, input: ::std::option::Option<i32>) -> Self {
        self.asset_version = input;
        self
    }
    /// <p>The specific asset version to retrieve the file from. If omitted, the latest version is returned.</p>
    pub fn get_asset_version(&self) -> &::std::option::Option<i32> {
        &self.asset_version
    }
    /// Consumes the builder and constructs a [`GetAssetFileInput`](crate::operation::get_asset_file::GetAssetFileInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_asset_file::GetAssetFileInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_asset_file::GetAssetFileInput {
            agent_space_id: self.agent_space_id,
            asset_id: self.asset_id,
            path: self.path,
            asset_version: self.asset_version,
        })
    }
}