aws-sdk-devicefarm 1.99.0

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

/// <p>Represents the amount of CPU that an app is using on a physical device. Does not represent system-wide CPU usage.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Cpu {
    /// <p>The CPU's frequency.</p>
    pub frequency: ::std::option::Option<::std::string::String>,
    /// <p>The CPU's architecture (for example, x86 or ARM).</p>
    pub architecture: ::std::option::Option<::std::string::String>,
    /// <p>The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.</p>
    pub clock: ::std::option::Option<f64>,
}
impl Cpu {
    /// <p>The CPU's frequency.</p>
    pub fn frequency(&self) -> ::std::option::Option<&str> {
        self.frequency.as_deref()
    }
    /// <p>The CPU's architecture (for example, x86 or ARM).</p>
    pub fn architecture(&self) -> ::std::option::Option<&str> {
        self.architecture.as_deref()
    }
    /// <p>The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.</p>
    pub fn clock(&self) -> ::std::option::Option<f64> {
        self.clock
    }
}
impl Cpu {
    /// Creates a new builder-style object to manufacture [`Cpu`](crate::types::Cpu).
    pub fn builder() -> crate::types::builders::CpuBuilder {
        crate::types::builders::CpuBuilder::default()
    }
}

/// A builder for [`Cpu`](crate::types::Cpu).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CpuBuilder {
    pub(crate) frequency: ::std::option::Option<::std::string::String>,
    pub(crate) architecture: ::std::option::Option<::std::string::String>,
    pub(crate) clock: ::std::option::Option<f64>,
}
impl CpuBuilder {
    /// <p>The CPU's frequency.</p>
    pub fn frequency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.frequency = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CPU's frequency.</p>
    pub fn set_frequency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.frequency = input;
        self
    }
    /// <p>The CPU's frequency.</p>
    pub fn get_frequency(&self) -> &::std::option::Option<::std::string::String> {
        &self.frequency
    }
    /// <p>The CPU's architecture (for example, x86 or ARM).</p>
    pub fn architecture(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.architecture = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The CPU's architecture (for example, x86 or ARM).</p>
    pub fn set_architecture(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.architecture = input;
        self
    }
    /// <p>The CPU's architecture (for example, x86 or ARM).</p>
    pub fn get_architecture(&self) -> &::std::option::Option<::std::string::String> {
        &self.architecture
    }
    /// <p>The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.</p>
    pub fn clock(mut self, input: f64) -> Self {
        self.clock = ::std::option::Option::Some(input);
        self
    }
    /// <p>The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.</p>
    pub fn set_clock(mut self, input: ::std::option::Option<f64>) -> Self {
        self.clock = input;
        self
    }
    /// <p>The clock speed of the device's CPU, expressed in hertz (Hz). For example, a 1.2 GHz CPU is expressed as 1200000000.</p>
    pub fn get_clock(&self) -> &::std::option::Option<f64> {
        &self.clock
    }
    /// Consumes the builder and constructs a [`Cpu`](crate::types::Cpu).
    pub fn build(self) -> crate::types::Cpu {
        crate::types::Cpu {
            frequency: self.frequency,
            architecture: self.architecture,
            clock: self.clock,
        }
    }
}