#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Device {
pub arn: ::std::option::Option<::std::string::String>,
pub name: ::std::option::Option<::std::string::String>,
pub manufacturer: ::std::option::Option<::std::string::String>,
pub model: ::std::option::Option<::std::string::String>,
pub model_id: ::std::option::Option<::std::string::String>,
pub form_factor: ::std::option::Option<crate::types::DeviceFormFactor>,
pub platform: ::std::option::Option<crate::types::DevicePlatform>,
pub os: ::std::option::Option<::std::string::String>,
pub cpu: ::std::option::Option<crate::types::Cpu>,
pub resolution: ::std::option::Option<crate::types::Resolution>,
pub heap_size: ::std::option::Option<i64>,
pub memory: ::std::option::Option<i64>,
pub image: ::std::option::Option<::std::string::String>,
pub carrier: ::std::option::Option<::std::string::String>,
pub radio: ::std::option::Option<::std::string::String>,
pub remote_access_enabled: ::std::option::Option<bool>,
#[deprecated(note = "Direct Device Access is no longer available.", since = "2019-09-09")]
pub remote_debug_enabled: ::std::option::Option<bool>,
pub fleet_type: ::std::option::Option<::std::string::String>,
pub fleet_name: ::std::option::Option<::std::string::String>,
pub instances: ::std::option::Option<::std::vec::Vec<crate::types::DeviceInstance>>,
pub availability: ::std::option::Option<crate::types::DeviceAvailability>,
}
impl Device {
pub fn arn(&self) -> ::std::option::Option<&str> {
self.arn.as_deref()
}
pub fn name(&self) -> ::std::option::Option<&str> {
self.name.as_deref()
}
pub fn manufacturer(&self) -> ::std::option::Option<&str> {
self.manufacturer.as_deref()
}
pub fn model(&self) -> ::std::option::Option<&str> {
self.model.as_deref()
}
pub fn model_id(&self) -> ::std::option::Option<&str> {
self.model_id.as_deref()
}
pub fn form_factor(&self) -> ::std::option::Option<&crate::types::DeviceFormFactor> {
self.form_factor.as_ref()
}
pub fn platform(&self) -> ::std::option::Option<&crate::types::DevicePlatform> {
self.platform.as_ref()
}
pub fn os(&self) -> ::std::option::Option<&str> {
self.os.as_deref()
}
pub fn cpu(&self) -> ::std::option::Option<&crate::types::Cpu> {
self.cpu.as_ref()
}
pub fn resolution(&self) -> ::std::option::Option<&crate::types::Resolution> {
self.resolution.as_ref()
}
pub fn heap_size(&self) -> ::std::option::Option<i64> {
self.heap_size
}
pub fn memory(&self) -> ::std::option::Option<i64> {
self.memory
}
pub fn image(&self) -> ::std::option::Option<&str> {
self.image.as_deref()
}
pub fn carrier(&self) -> ::std::option::Option<&str> {
self.carrier.as_deref()
}
pub fn radio(&self) -> ::std::option::Option<&str> {
self.radio.as_deref()
}
pub fn remote_access_enabled(&self) -> ::std::option::Option<bool> {
self.remote_access_enabled
}
#[deprecated(note = "Direct Device Access is no longer available.", since = "2019-09-09")]
pub fn remote_debug_enabled(&self) -> ::std::option::Option<bool> {
self.remote_debug_enabled
}
pub fn fleet_type(&self) -> ::std::option::Option<&str> {
self.fleet_type.as_deref()
}
pub fn fleet_name(&self) -> ::std::option::Option<&str> {
self.fleet_name.as_deref()
}
pub fn instances(&self) -> &[crate::types::DeviceInstance] {
self.instances.as_deref().unwrap_or_default()
}
pub fn availability(&self) -> ::std::option::Option<&crate::types::DeviceAvailability> {
self.availability.as_ref()
}
}
impl Device {
pub fn builder() -> crate::types::builders::DeviceBuilder {
crate::types::builders::DeviceBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DeviceBuilder {
pub(crate) arn: ::std::option::Option<::std::string::String>,
pub(crate) name: ::std::option::Option<::std::string::String>,
pub(crate) manufacturer: ::std::option::Option<::std::string::String>,
pub(crate) model: ::std::option::Option<::std::string::String>,
pub(crate) model_id: ::std::option::Option<::std::string::String>,
pub(crate) form_factor: ::std::option::Option<crate::types::DeviceFormFactor>,
pub(crate) platform: ::std::option::Option<crate::types::DevicePlatform>,
pub(crate) os: ::std::option::Option<::std::string::String>,
pub(crate) cpu: ::std::option::Option<crate::types::Cpu>,
pub(crate) resolution: ::std::option::Option<crate::types::Resolution>,
pub(crate) heap_size: ::std::option::Option<i64>,
pub(crate) memory: ::std::option::Option<i64>,
pub(crate) image: ::std::option::Option<::std::string::String>,
pub(crate) carrier: ::std::option::Option<::std::string::String>,
pub(crate) radio: ::std::option::Option<::std::string::String>,
pub(crate) remote_access_enabled: ::std::option::Option<bool>,
pub(crate) remote_debug_enabled: ::std::option::Option<bool>,
pub(crate) fleet_type: ::std::option::Option<::std::string::String>,
pub(crate) fleet_name: ::std::option::Option<::std::string::String>,
pub(crate) instances: ::std::option::Option<::std::vec::Vec<crate::types::DeviceInstance>>,
pub(crate) availability: ::std::option::Option<crate::types::DeviceAvailability>,
}
impl DeviceBuilder {
pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.arn = ::std::option::Option::Some(input.into());
self
}
pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.arn = input;
self
}
pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.arn
}
pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.name = ::std::option::Option::Some(input.into());
self
}
pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.name = input;
self
}
pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
&self.name
}
pub fn manufacturer(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.manufacturer = ::std::option::Option::Some(input.into());
self
}
pub fn set_manufacturer(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.manufacturer = input;
self
}
pub fn get_manufacturer(&self) -> &::std::option::Option<::std::string::String> {
&self.manufacturer
}
pub fn model(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.model = ::std::option::Option::Some(input.into());
self
}
pub fn set_model(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.model = input;
self
}
pub fn get_model(&self) -> &::std::option::Option<::std::string::String> {
&self.model
}
pub fn model_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.model_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_model_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.model_id = input;
self
}
pub fn get_model_id(&self) -> &::std::option::Option<::std::string::String> {
&self.model_id
}
pub fn form_factor(mut self, input: crate::types::DeviceFormFactor) -> Self {
self.form_factor = ::std::option::Option::Some(input);
self
}
pub fn set_form_factor(mut self, input: ::std::option::Option<crate::types::DeviceFormFactor>) -> Self {
self.form_factor = input;
self
}
pub fn get_form_factor(&self) -> &::std::option::Option<crate::types::DeviceFormFactor> {
&self.form_factor
}
pub fn platform(mut self, input: crate::types::DevicePlatform) -> Self {
self.platform = ::std::option::Option::Some(input);
self
}
pub fn set_platform(mut self, input: ::std::option::Option<crate::types::DevicePlatform>) -> Self {
self.platform = input;
self
}
pub fn get_platform(&self) -> &::std::option::Option<crate::types::DevicePlatform> {
&self.platform
}
pub fn os(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.os = ::std::option::Option::Some(input.into());
self
}
pub fn set_os(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.os = input;
self
}
pub fn get_os(&self) -> &::std::option::Option<::std::string::String> {
&self.os
}
pub fn cpu(mut self, input: crate::types::Cpu) -> Self {
self.cpu = ::std::option::Option::Some(input);
self
}
pub fn set_cpu(mut self, input: ::std::option::Option<crate::types::Cpu>) -> Self {
self.cpu = input;
self
}
pub fn get_cpu(&self) -> &::std::option::Option<crate::types::Cpu> {
&self.cpu
}
pub fn resolution(mut self, input: crate::types::Resolution) -> Self {
self.resolution = ::std::option::Option::Some(input);
self
}
pub fn set_resolution(mut self, input: ::std::option::Option<crate::types::Resolution>) -> Self {
self.resolution = input;
self
}
pub fn get_resolution(&self) -> &::std::option::Option<crate::types::Resolution> {
&self.resolution
}
pub fn heap_size(mut self, input: i64) -> Self {
self.heap_size = ::std::option::Option::Some(input);
self
}
pub fn set_heap_size(mut self, input: ::std::option::Option<i64>) -> Self {
self.heap_size = input;
self
}
pub fn get_heap_size(&self) -> &::std::option::Option<i64> {
&self.heap_size
}
pub fn memory(mut self, input: i64) -> Self {
self.memory = ::std::option::Option::Some(input);
self
}
pub fn set_memory(mut self, input: ::std::option::Option<i64>) -> Self {
self.memory = input;
self
}
pub fn get_memory(&self) -> &::std::option::Option<i64> {
&self.memory
}
pub fn image(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.image = ::std::option::Option::Some(input.into());
self
}
pub fn set_image(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.image = input;
self
}
pub fn get_image(&self) -> &::std::option::Option<::std::string::String> {
&self.image
}
pub fn carrier(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.carrier = ::std::option::Option::Some(input.into());
self
}
pub fn set_carrier(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.carrier = input;
self
}
pub fn get_carrier(&self) -> &::std::option::Option<::std::string::String> {
&self.carrier
}
pub fn radio(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.radio = ::std::option::Option::Some(input.into());
self
}
pub fn set_radio(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.radio = input;
self
}
pub fn get_radio(&self) -> &::std::option::Option<::std::string::String> {
&self.radio
}
pub fn remote_access_enabled(mut self, input: bool) -> Self {
self.remote_access_enabled = ::std::option::Option::Some(input);
self
}
pub fn set_remote_access_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.remote_access_enabled = input;
self
}
pub fn get_remote_access_enabled(&self) -> &::std::option::Option<bool> {
&self.remote_access_enabled
}
#[deprecated(note = "Direct Device Access is no longer available.", since = "2019-09-09")]
pub fn remote_debug_enabled(mut self, input: bool) -> Self {
self.remote_debug_enabled = ::std::option::Option::Some(input);
self
}
#[deprecated(note = "Direct Device Access is no longer available.", since = "2019-09-09")]
pub fn set_remote_debug_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
self.remote_debug_enabled = input;
self
}
#[deprecated(note = "Direct Device Access is no longer available.", since = "2019-09-09")]
pub fn get_remote_debug_enabled(&self) -> &::std::option::Option<bool> {
&self.remote_debug_enabled
}
pub fn fleet_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fleet_type = ::std::option::Option::Some(input.into());
self
}
pub fn set_fleet_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fleet_type = input;
self
}
pub fn get_fleet_type(&self) -> &::std::option::Option<::std::string::String> {
&self.fleet_type
}
pub fn fleet_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.fleet_name = ::std::option::Option::Some(input.into());
self
}
pub fn set_fleet_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.fleet_name = input;
self
}
pub fn get_fleet_name(&self) -> &::std::option::Option<::std::string::String> {
&self.fleet_name
}
pub fn instances(mut self, input: crate::types::DeviceInstance) -> Self {
let mut v = self.instances.unwrap_or_default();
v.push(input);
self.instances = ::std::option::Option::Some(v);
self
}
pub fn set_instances(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::DeviceInstance>>) -> Self {
self.instances = input;
self
}
pub fn get_instances(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::DeviceInstance>> {
&self.instances
}
pub fn availability(mut self, input: crate::types::DeviceAvailability) -> Self {
self.availability = ::std::option::Option::Some(input);
self
}
pub fn set_availability(mut self, input: ::std::option::Option<crate::types::DeviceAvailability>) -> Self {
self.availability = input;
self
}
pub fn get_availability(&self) -> &::std::option::Option<crate::types::DeviceAvailability> {
&self.availability
}
pub fn build(self) -> crate::types::Device {
crate::types::Device {
arn: self.arn,
name: self.name,
manufacturer: self.manufacturer,
model: self.model,
model_id: self.model_id,
form_factor: self.form_factor,
platform: self.platform,
os: self.os,
cpu: self.cpu,
resolution: self.resolution,
heap_size: self.heap_size,
memory: self.memory,
image: self.image,
carrier: self.carrier,
radio: self.radio,
remote_access_enabled: self.remote_access_enabled,
remote_debug_enabled: self.remote_debug_enabled,
fleet_type: self.fleet_type,
fleet_name: self.fleet_name,
instances: self.instances,
availability: self.availability,
}
}
}