aws-sdk-devicefarm 1.98.0

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

/// <p>Represents a sample of performance data.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Sample {
    /// <p>The sample's ARN.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The sample's type.</p>
    /// <p>Must be one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.</p></li>
    /// <li>
    /// <p>MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.</p></li>
    /// <li>
    /// <p>NATIVE_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_FPS</p></li>
    /// <li>
    /// <p>NATIVE_FRAMES</p></li>
    /// <li>
    /// <p>NATIVE_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_FPS</p></li>
    /// <li>
    /// <p>OPENGL_FRAMES</p></li>
    /// <li>
    /// <p>OPENGL_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>RX</p></li>
    /// <li>
    /// <p>RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.</p></li>
    /// <li>
    /// <p>THREADS: A threads sample type. This is expressed as the total number of threads per app process.</p></li>
    /// <li>
    /// <p>TX</p></li>
    /// <li>
    /// <p>TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.</p></li>
    /// </ul>
    pub r#type: ::std::option::Option<crate::types::SampleType>,
    /// <p>The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.</p>
    pub url: ::std::option::Option<::std::string::String>,
}
impl Sample {
    /// <p>The sample's ARN.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The sample's type.</p>
    /// <p>Must be one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.</p></li>
    /// <li>
    /// <p>MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.</p></li>
    /// <li>
    /// <p>NATIVE_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_FPS</p></li>
    /// <li>
    /// <p>NATIVE_FRAMES</p></li>
    /// <li>
    /// <p>NATIVE_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_FPS</p></li>
    /// <li>
    /// <p>OPENGL_FRAMES</p></li>
    /// <li>
    /// <p>OPENGL_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>RX</p></li>
    /// <li>
    /// <p>RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.</p></li>
    /// <li>
    /// <p>THREADS: A threads sample type. This is expressed as the total number of threads per app process.</p></li>
    /// <li>
    /// <p>TX</p></li>
    /// <li>
    /// <p>TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.</p></li>
    /// </ul>
    pub fn r#type(&self) -> ::std::option::Option<&crate::types::SampleType> {
        self.r#type.as_ref()
    }
    /// <p>The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.</p>
    pub fn url(&self) -> ::std::option::Option<&str> {
        self.url.as_deref()
    }
}
impl Sample {
    /// Creates a new builder-style object to manufacture [`Sample`](crate::types::Sample).
    pub fn builder() -> crate::types::builders::SampleBuilder {
        crate::types::builders::SampleBuilder::default()
    }
}

/// A builder for [`Sample`](crate::types::Sample).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SampleBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) r#type: ::std::option::Option<crate::types::SampleType>,
    pub(crate) url: ::std::option::Option<::std::string::String>,
}
impl SampleBuilder {
    /// <p>The sample's ARN.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The sample's ARN.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The sample's ARN.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The sample's type.</p>
    /// <p>Must be one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.</p></li>
    /// <li>
    /// <p>MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.</p></li>
    /// <li>
    /// <p>NATIVE_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_FPS</p></li>
    /// <li>
    /// <p>NATIVE_FRAMES</p></li>
    /// <li>
    /// <p>NATIVE_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_FPS</p></li>
    /// <li>
    /// <p>OPENGL_FRAMES</p></li>
    /// <li>
    /// <p>OPENGL_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>RX</p></li>
    /// <li>
    /// <p>RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.</p></li>
    /// <li>
    /// <p>THREADS: A threads sample type. This is expressed as the total number of threads per app process.</p></li>
    /// <li>
    /// <p>TX</p></li>
    /// <li>
    /// <p>TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.</p></li>
    /// </ul>
    pub fn r#type(mut self, input: crate::types::SampleType) -> Self {
        self.r#type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The sample's type.</p>
    /// <p>Must be one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.</p></li>
    /// <li>
    /// <p>MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.</p></li>
    /// <li>
    /// <p>NATIVE_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_FPS</p></li>
    /// <li>
    /// <p>NATIVE_FRAMES</p></li>
    /// <li>
    /// <p>NATIVE_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_FPS</p></li>
    /// <li>
    /// <p>OPENGL_FRAMES</p></li>
    /// <li>
    /// <p>OPENGL_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>RX</p></li>
    /// <li>
    /// <p>RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.</p></li>
    /// <li>
    /// <p>THREADS: A threads sample type. This is expressed as the total number of threads per app process.</p></li>
    /// <li>
    /// <p>TX</p></li>
    /// <li>
    /// <p>TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.</p></li>
    /// </ul>
    pub fn set_type(mut self, input: ::std::option::Option<crate::types::SampleType>) -> Self {
        self.r#type = input;
        self
    }
    /// <p>The sample's type.</p>
    /// <p>Must be one of the following values:</p>
    /// <ul>
    /// <li>
    /// <p>CPU: A CPU sample type. This is expressed as the app processing CPU time (including child processes) as reported by process, as a percentage.</p></li>
    /// <li>
    /// <p>MEMORY: A memory usage sample type. This is expressed as the total proportional set size of an app process, in kilobytes.</p></li>
    /// <li>
    /// <p>NATIVE_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_FPS</p></li>
    /// <li>
    /// <p>NATIVE_FRAMES</p></li>
    /// <li>
    /// <p>NATIVE_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>NATIVE_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_AVG_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_FPS</p></li>
    /// <li>
    /// <p>OPENGL_FRAMES</p></li>
    /// <li>
    /// <p>OPENGL_MAX_DRAWTIME</p></li>
    /// <li>
    /// <p>OPENGL_MIN_DRAWTIME</p></li>
    /// <li>
    /// <p>RX</p></li>
    /// <li>
    /// <p>RX_RATE: The total number of bytes per second (TCP and UDP) that are sent, by app process.</p></li>
    /// <li>
    /// <p>THREADS: A threads sample type. This is expressed as the total number of threads per app process.</p></li>
    /// <li>
    /// <p>TX</p></li>
    /// <li>
    /// <p>TX_RATE: The total number of bytes per second (TCP and UDP) that are received, by app process.</p></li>
    /// </ul>
    pub fn get_type(&self) -> &::std::option::Option<crate::types::SampleType> {
        &self.r#type
    }
    /// <p>The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.</p>
    pub fn url(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.url = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.</p>
    pub fn set_url(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.url = input;
        self
    }
    /// <p>The presigned Amazon S3 URL that can be used with a GET request to download the sample's file.</p>
    pub fn get_url(&self) -> &::std::option::Option<::std::string::String> {
        &self.url
    }
    /// Consumes the builder and constructs a [`Sample`](crate::types::Sample).
    pub fn build(self) -> crate::types::Sample {
        crate::types::Sample {
            arn: self.arn,
            r#type: self.r#type,
            url: self.url,
        }
    }
}