1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
// 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,
}
}
}