aws-sdk-omics 1.99.0

AWS SDK for Amazon Omics
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 GetRunTaskOutput {
    /// <p>The task's ID.</p>
    pub task_id: ::std::option::Option<::std::string::String>,
    /// <p>The task's status.</p>
    pub status: ::std::option::Option<crate::types::TaskStatus>,
    /// <p>The task's name.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The task's CPU usage.</p>
    pub cpus: ::std::option::Option<i32>,
    /// <p>Set to true if Amazon Web Services HealthOmics found a matching entry in the run cache for this task.</p>
    pub cache_hit: ::std::option::Option<bool>,
    /// <p>The S3 URI of the cache location.</p>
    pub cache_s3_uri: ::std::option::Option<::std::string::String>,
    /// <p>The task's memory use in gigabytes.</p>
    pub memory: ::std::option::Option<i32>,
    /// <p>When the task was created.</p>
    pub creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The task's start time.</p>
    pub start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The task's stop time.</p>
    pub stop_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The task's status message.</p>
    pub status_message: ::std::option::Option<::std::string::String>,
    /// <p>The task's log stream.</p>
    pub log_stream: ::std::option::Option<::std::string::String>,
    /// <p>The number of Graphics Processing Units (GPU) specified in the task.</p>
    pub gpus: ::std::option::Option<i32>,
    /// <p>The instance type for a task.</p>
    pub instance_type: ::std::option::Option<::std::string::String>,
    /// <p>The reason a task has failed.</p>
    pub failure_reason: ::std::option::Option<::std::string::String>,
    /// <p>Details about the container image that this task uses.</p>
    pub image_details: ::std::option::Option<crate::types::ImageDetails>,
    _request_id: Option<String>,
}
impl GetRunTaskOutput {
    /// <p>The task's ID.</p>
    pub fn task_id(&self) -> ::std::option::Option<&str> {
        self.task_id.as_deref()
    }
    /// <p>The task's status.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::TaskStatus> {
        self.status.as_ref()
    }
    /// <p>The task's name.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The task's CPU usage.</p>
    pub fn cpus(&self) -> ::std::option::Option<i32> {
        self.cpus
    }
    /// <p>Set to true if Amazon Web Services HealthOmics found a matching entry in the run cache for this task.</p>
    pub fn cache_hit(&self) -> ::std::option::Option<bool> {
        self.cache_hit
    }
    /// <p>The S3 URI of the cache location.</p>
    pub fn cache_s3_uri(&self) -> ::std::option::Option<&str> {
        self.cache_s3_uri.as_deref()
    }
    /// <p>The task's memory use in gigabytes.</p>
    pub fn memory(&self) -> ::std::option::Option<i32> {
        self.memory
    }
    /// <p>When the task was created.</p>
    pub fn creation_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.creation_time.as_ref()
    }
    /// <p>The task's start time.</p>
    pub fn start_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.start_time.as_ref()
    }
    /// <p>The task's stop time.</p>
    pub fn stop_time(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.stop_time.as_ref()
    }
    /// <p>The task's status message.</p>
    pub fn status_message(&self) -> ::std::option::Option<&str> {
        self.status_message.as_deref()
    }
    /// <p>The task's log stream.</p>
    pub fn log_stream(&self) -> ::std::option::Option<&str> {
        self.log_stream.as_deref()
    }
    /// <p>The number of Graphics Processing Units (GPU) specified in the task.</p>
    pub fn gpus(&self) -> ::std::option::Option<i32> {
        self.gpus
    }
    /// <p>The instance type for a task.</p>
    pub fn instance_type(&self) -> ::std::option::Option<&str> {
        self.instance_type.as_deref()
    }
    /// <p>The reason a task has failed.</p>
    pub fn failure_reason(&self) -> ::std::option::Option<&str> {
        self.failure_reason.as_deref()
    }
    /// <p>Details about the container image that this task uses.</p>
    pub fn image_details(&self) -> ::std::option::Option<&crate::types::ImageDetails> {
        self.image_details.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetRunTaskOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetRunTaskOutput {
    /// Creates a new builder-style object to manufacture [`GetRunTaskOutput`](crate::operation::get_run_task::GetRunTaskOutput).
    pub fn builder() -> crate::operation::get_run_task::builders::GetRunTaskOutputBuilder {
        crate::operation::get_run_task::builders::GetRunTaskOutputBuilder::default()
    }
}

/// A builder for [`GetRunTaskOutput`](crate::operation::get_run_task::GetRunTaskOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetRunTaskOutputBuilder {
    pub(crate) task_id: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::TaskStatus>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) cpus: ::std::option::Option<i32>,
    pub(crate) cache_hit: ::std::option::Option<bool>,
    pub(crate) cache_s3_uri: ::std::option::Option<::std::string::String>,
    pub(crate) memory: ::std::option::Option<i32>,
    pub(crate) creation_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) start_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) stop_time: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) status_message: ::std::option::Option<::std::string::String>,
    pub(crate) log_stream: ::std::option::Option<::std::string::String>,
    pub(crate) gpus: ::std::option::Option<i32>,
    pub(crate) instance_type: ::std::option::Option<::std::string::String>,
    pub(crate) failure_reason: ::std::option::Option<::std::string::String>,
    pub(crate) image_details: ::std::option::Option<crate::types::ImageDetails>,
    _request_id: Option<String>,
}
impl GetRunTaskOutputBuilder {
    /// <p>The task's ID.</p>
    pub fn task_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.task_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task's ID.</p>
    pub fn set_task_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.task_id = input;
        self
    }
    /// <p>The task's ID.</p>
    pub fn get_task_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.task_id
    }
    /// <p>The task's status.</p>
    pub fn status(mut self, input: crate::types::TaskStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The task's status.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::TaskStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The task's status.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::TaskStatus> {
        &self.status
    }
    /// <p>The task's name.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task's name.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The task's name.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The task's CPU usage.</p>
    pub fn cpus(mut self, input: i32) -> Self {
        self.cpus = ::std::option::Option::Some(input);
        self
    }
    /// <p>The task's CPU usage.</p>
    pub fn set_cpus(mut self, input: ::std::option::Option<i32>) -> Self {
        self.cpus = input;
        self
    }
    /// <p>The task's CPU usage.</p>
    pub fn get_cpus(&self) -> &::std::option::Option<i32> {
        &self.cpus
    }
    /// <p>Set to true if Amazon Web Services HealthOmics found a matching entry in the run cache for this task.</p>
    pub fn cache_hit(mut self, input: bool) -> Self {
        self.cache_hit = ::std::option::Option::Some(input);
        self
    }
    /// <p>Set to true if Amazon Web Services HealthOmics found a matching entry in the run cache for this task.</p>
    pub fn set_cache_hit(mut self, input: ::std::option::Option<bool>) -> Self {
        self.cache_hit = input;
        self
    }
    /// <p>Set to true if Amazon Web Services HealthOmics found a matching entry in the run cache for this task.</p>
    pub fn get_cache_hit(&self) -> &::std::option::Option<bool> {
        &self.cache_hit
    }
    /// <p>The S3 URI of the cache location.</p>
    pub fn cache_s3_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cache_s3_uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The S3 URI of the cache location.</p>
    pub fn set_cache_s3_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cache_s3_uri = input;
        self
    }
    /// <p>The S3 URI of the cache location.</p>
    pub fn get_cache_s3_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.cache_s3_uri
    }
    /// <p>The task's memory use in gigabytes.</p>
    pub fn memory(mut self, input: i32) -> Self {
        self.memory = ::std::option::Option::Some(input);
        self
    }
    /// <p>The task's memory use in gigabytes.</p>
    pub fn set_memory(mut self, input: ::std::option::Option<i32>) -> Self {
        self.memory = input;
        self
    }
    /// <p>The task's memory use in gigabytes.</p>
    pub fn get_memory(&self) -> &::std::option::Option<i32> {
        &self.memory
    }
    /// <p>When the task was created.</p>
    pub fn creation_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.creation_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>When the task was created.</p>
    pub fn set_creation_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.creation_time = input;
        self
    }
    /// <p>When the task was created.</p>
    pub fn get_creation_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.creation_time
    }
    /// <p>The task's start time.</p>
    pub fn start_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.start_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The task's start time.</p>
    pub fn set_start_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.start_time = input;
        self
    }
    /// <p>The task's start time.</p>
    pub fn get_start_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.start_time
    }
    /// <p>The task's stop time.</p>
    pub fn stop_time(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.stop_time = ::std::option::Option::Some(input);
        self
    }
    /// <p>The task's stop time.</p>
    pub fn set_stop_time(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.stop_time = input;
        self
    }
    /// <p>The task's stop time.</p>
    pub fn get_stop_time(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.stop_time
    }
    /// <p>The task's status message.</p>
    pub fn status_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status_message = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task's status message.</p>
    pub fn set_status_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status_message = input;
        self
    }
    /// <p>The task's status message.</p>
    pub fn get_status_message(&self) -> &::std::option::Option<::std::string::String> {
        &self.status_message
    }
    /// <p>The task's log stream.</p>
    pub fn log_stream(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.log_stream = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The task's log stream.</p>
    pub fn set_log_stream(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_stream = input;
        self
    }
    /// <p>The task's log stream.</p>
    pub fn get_log_stream(&self) -> &::std::option::Option<::std::string::String> {
        &self.log_stream
    }
    /// <p>The number of Graphics Processing Units (GPU) specified in the task.</p>
    pub fn gpus(mut self, input: i32) -> Self {
        self.gpus = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of Graphics Processing Units (GPU) specified in the task.</p>
    pub fn set_gpus(mut self, input: ::std::option::Option<i32>) -> Self {
        self.gpus = input;
        self
    }
    /// <p>The number of Graphics Processing Units (GPU) specified in the task.</p>
    pub fn get_gpus(&self) -> &::std::option::Option<i32> {
        &self.gpus
    }
    /// <p>The instance type for a task.</p>
    pub fn instance_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The instance type for a task.</p>
    pub fn set_instance_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_type = input;
        self
    }
    /// <p>The instance type for a task.</p>
    pub fn get_instance_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_type
    }
    /// <p>The reason a task has failed.</p>
    pub fn failure_reason(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.failure_reason = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The reason a task has failed.</p>
    pub fn set_failure_reason(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.failure_reason = input;
        self
    }
    /// <p>The reason a task has failed.</p>
    pub fn get_failure_reason(&self) -> &::std::option::Option<::std::string::String> {
        &self.failure_reason
    }
    /// <p>Details about the container image that this task uses.</p>
    pub fn image_details(mut self, input: crate::types::ImageDetails) -> Self {
        self.image_details = ::std::option::Option::Some(input);
        self
    }
    /// <p>Details about the container image that this task uses.</p>
    pub fn set_image_details(mut self, input: ::std::option::Option<crate::types::ImageDetails>) -> Self {
        self.image_details = input;
        self
    }
    /// <p>Details about the container image that this task uses.</p>
    pub fn get_image_details(&self) -> &::std::option::Option<crate::types::ImageDetails> {
        &self.image_details
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetRunTaskOutput`](crate::operation::get_run_task::GetRunTaskOutput).
    pub fn build(self) -> crate::operation::get_run_task::GetRunTaskOutput {
        crate::operation::get_run_task::GetRunTaskOutput {
            task_id: self.task_id,
            status: self.status,
            name: self.name,
            cpus: self.cpus,
            cache_hit: self.cache_hit,
            cache_s3_uri: self.cache_s3_uri,
            memory: self.memory,
            creation_time: self.creation_time,
            start_time: self.start_time,
            stop_time: self.stop_time,
            status_message: self.status_message,
            log_stream: self.log_stream,
            gpus: self.gpus,
            instance_type: self.instance_type,
            failure_reason: self.failure_reason,
            image_details: self.image_details,
            _request_id: self._request_id,
        }
    }
}