{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.DeviceFarm.Types.Device
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DeviceFarm.Types.Device where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.DeviceFarm.Types.CPU
import Amazonka.DeviceFarm.Types.DeviceAvailability
import Amazonka.DeviceFarm.Types.DeviceFormFactor
import Amazonka.DeviceFarm.Types.DeviceInstance
import Amazonka.DeviceFarm.Types.DevicePlatform
import Amazonka.DeviceFarm.Types.Resolution
import qualified Amazonka.Prelude as Prelude

-- | Represents a device type that an app is tested against.
--
-- /See:/ 'newDevice' smart constructor.
data Device = Device'
  { -- | The device\'s ARN.
    Device -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | Indicates how likely a device is available for a test run. Currently
    -- available in the ListDevices and GetDevice API methods.
    Device -> Maybe DeviceAvailability
availability :: Prelude.Maybe DeviceAvailability,
    -- | The device\'s carrier.
    Device -> Maybe Text
carrier :: Prelude.Maybe Prelude.Text,
    -- | Information about the device\'s CPU.
    Device -> Maybe CPU
cpu :: Prelude.Maybe CPU,
    -- | The name of the fleet to which this device belongs.
    Device -> Maybe Text
fleetName :: Prelude.Maybe Prelude.Text,
    -- | The type of fleet to which this device belongs. Possible values are
    -- PRIVATE and PUBLIC.
    Device -> Maybe Text
fleetType :: Prelude.Maybe Prelude.Text,
    -- | The device\'s form factor.
    --
    -- Allowed values include:
    --
    -- -   PHONE
    --
    -- -   TABLET
    Device -> Maybe DeviceFormFactor
formFactor :: Prelude.Maybe DeviceFormFactor,
    -- | The device\'s heap size, expressed in bytes.
    Device -> Maybe Integer
heapSize :: Prelude.Maybe Prelude.Integer,
    -- | The device\'s image name.
    Device -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The instances that belong to this device.
    Device -> Maybe [DeviceInstance]
instances :: Prelude.Maybe [DeviceInstance],
    -- | The device\'s manufacturer name.
    Device -> Maybe Text
manufacturer :: Prelude.Maybe Prelude.Text,
    -- | The device\'s total memory size, expressed in bytes.
    Device -> Maybe Integer
memory :: Prelude.Maybe Prelude.Integer,
    -- | The device\'s model name.
    Device -> Maybe Text
model :: Prelude.Maybe Prelude.Text,
    -- | The device\'s model ID.
    Device -> Maybe Text
modelId :: Prelude.Maybe Prelude.Text,
    -- | The device\'s display name.
    Device -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The device\'s operating system type.
    Device -> Maybe Text
os :: Prelude.Maybe Prelude.Text,
    -- | The device\'s platform.
    --
    -- Allowed values include:
    --
    -- -   ANDROID
    --
    -- -   IOS
    Device -> Maybe DevicePlatform
platform :: Prelude.Maybe DevicePlatform,
    -- | The device\'s radio.
    Device -> Maybe Text
radio :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether remote access has been enabled for the specified
    -- device.
    Device -> Maybe Bool
remoteAccessEnabled :: Prelude.Maybe Prelude.Bool,
    -- | This flag is set to @true@ if remote debugging is enabled for the
    -- device.
    --
    -- Remote debugging is
    -- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
    Device -> Maybe Bool
remoteDebugEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The resolution of the device.
    Device -> Maybe Resolution
resolution :: Prelude.Maybe Resolution
  }
  deriving (Device -> Device -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Device -> Device -> Bool
$c/= :: Device -> Device -> Bool
== :: Device -> Device -> Bool
$c== :: Device -> Device -> Bool
Prelude.Eq, ReadPrec [Device]
ReadPrec Device
Int -> ReadS Device
ReadS [Device]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Device]
$creadListPrec :: ReadPrec [Device]
readPrec :: ReadPrec Device
$creadPrec :: ReadPrec Device
readList :: ReadS [Device]
$creadList :: ReadS [Device]
readsPrec :: Int -> ReadS Device
$creadsPrec :: Int -> ReadS Device
Prelude.Read, Int -> Device -> ShowS
[Device] -> ShowS
Device -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Device] -> ShowS
$cshowList :: [Device] -> ShowS
show :: Device -> String
$cshow :: Device -> String
showsPrec :: Int -> Device -> ShowS
$cshowsPrec :: Int -> Device -> ShowS
Prelude.Show, forall x. Rep Device x -> Device
forall x. Device -> Rep Device x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep Device x -> Device
$cfrom :: forall x. Device -> Rep Device x
Prelude.Generic)

-- |
-- Create a value of 'Device' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'arn', 'device_arn' - The device\'s ARN.
--
-- 'availability', 'device_availability' - Indicates how likely a device is available for a test run. Currently
-- available in the ListDevices and GetDevice API methods.
--
-- 'carrier', 'device_carrier' - The device\'s carrier.
--
-- 'cpu', 'device_cpu' - Information about the device\'s CPU.
--
-- 'fleetName', 'device_fleetName' - The name of the fleet to which this device belongs.
--
-- 'fleetType', 'device_fleetType' - The type of fleet to which this device belongs. Possible values are
-- PRIVATE and PUBLIC.
--
-- 'formFactor', 'device_formFactor' - The device\'s form factor.
--
-- Allowed values include:
--
-- -   PHONE
--
-- -   TABLET
--
-- 'heapSize', 'device_heapSize' - The device\'s heap size, expressed in bytes.
--
-- 'image', 'device_image' - The device\'s image name.
--
-- 'instances', 'device_instances' - The instances that belong to this device.
--
-- 'manufacturer', 'device_manufacturer' - The device\'s manufacturer name.
--
-- 'memory', 'device_memory' - The device\'s total memory size, expressed in bytes.
--
-- 'model', 'device_model' - The device\'s model name.
--
-- 'modelId', 'device_modelId' - The device\'s model ID.
--
-- 'name', 'device_name' - The device\'s display name.
--
-- 'os', 'device_os' - The device\'s operating system type.
--
-- 'platform', 'device_platform' - The device\'s platform.
--
-- Allowed values include:
--
-- -   ANDROID
--
-- -   IOS
--
-- 'radio', 'device_radio' - The device\'s radio.
--
-- 'remoteAccessEnabled', 'device_remoteAccessEnabled' - Specifies whether remote access has been enabled for the specified
-- device.
--
-- 'remoteDebugEnabled', 'device_remoteDebugEnabled' - This flag is set to @true@ if remote debugging is enabled for the
-- device.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
--
-- 'resolution', 'device_resolution' - The resolution of the device.
newDevice ::
  Device
newDevice :: Device
newDevice =
  Device'
    { $sel:arn:Device' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
      $sel:availability:Device' :: Maybe DeviceAvailability
availability = forall a. Maybe a
Prelude.Nothing,
      $sel:carrier:Device' :: Maybe Text
carrier = forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:Device' :: Maybe CPU
cpu = forall a. Maybe a
Prelude.Nothing,
      $sel:fleetName:Device' :: Maybe Text
fleetName = forall a. Maybe a
Prelude.Nothing,
      $sel:fleetType:Device' :: Maybe Text
fleetType = forall a. Maybe a
Prelude.Nothing,
      $sel:formFactor:Device' :: Maybe DeviceFormFactor
formFactor = forall a. Maybe a
Prelude.Nothing,
      $sel:heapSize:Device' :: Maybe Integer
heapSize = forall a. Maybe a
Prelude.Nothing,
      $sel:image:Device' :: Maybe Text
image = forall a. Maybe a
Prelude.Nothing,
      $sel:instances:Device' :: Maybe [DeviceInstance]
instances = forall a. Maybe a
Prelude.Nothing,
      $sel:manufacturer:Device' :: Maybe Text
manufacturer = forall a. Maybe a
Prelude.Nothing,
      $sel:memory:Device' :: Maybe Integer
memory = forall a. Maybe a
Prelude.Nothing,
      $sel:model:Device' :: Maybe Text
model = forall a. Maybe a
Prelude.Nothing,
      $sel:modelId:Device' :: Maybe Text
modelId = forall a. Maybe a
Prelude.Nothing,
      $sel:name:Device' :: Maybe Text
name = forall a. Maybe a
Prelude.Nothing,
      $sel:os:Device' :: Maybe Text
os = forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Device' :: Maybe DevicePlatform
platform = forall a. Maybe a
Prelude.Nothing,
      $sel:radio:Device' :: Maybe Text
radio = forall a. Maybe a
Prelude.Nothing,
      $sel:remoteAccessEnabled:Device' :: Maybe Bool
remoteAccessEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:remoteDebugEnabled:Device' :: Maybe Bool
remoteDebugEnabled = forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:Device' :: Maybe Resolution
resolution = forall a. Maybe a
Prelude.Nothing
    }

-- | The device\'s ARN.
device_arn :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_arn :: Lens' Device (Maybe Text)
device_arn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
arn :: Maybe Text
$sel:arn:Device' :: Device -> Maybe Text
arn} -> Maybe Text
arn) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:arn:Device' :: Maybe Text
arn = Maybe Text
a} :: Device)

-- | Indicates how likely a device is available for a test run. Currently
-- available in the ListDevices and GetDevice API methods.
device_availability :: Lens.Lens' Device (Prelude.Maybe DeviceAvailability)
device_availability :: Lens' Device (Maybe DeviceAvailability)
device_availability = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DeviceAvailability
availability :: Maybe DeviceAvailability
$sel:availability:Device' :: Device -> Maybe DeviceAvailability
availability} -> Maybe DeviceAvailability
availability) (\s :: Device
s@Device' {} Maybe DeviceAvailability
a -> Device
s {$sel:availability:Device' :: Maybe DeviceAvailability
availability = Maybe DeviceAvailability
a} :: Device)

-- | The device\'s carrier.
device_carrier :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_carrier :: Lens' Device (Maybe Text)
device_carrier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
carrier :: Maybe Text
$sel:carrier:Device' :: Device -> Maybe Text
carrier} -> Maybe Text
carrier) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:carrier:Device' :: Maybe Text
carrier = Maybe Text
a} :: Device)

-- | Information about the device\'s CPU.
device_cpu :: Lens.Lens' Device (Prelude.Maybe CPU)
device_cpu :: Lens' Device (Maybe CPU)
device_cpu = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe CPU
cpu :: Maybe CPU
$sel:cpu:Device' :: Device -> Maybe CPU
cpu} -> Maybe CPU
cpu) (\s :: Device
s@Device' {} Maybe CPU
a -> Device
s {$sel:cpu:Device' :: Maybe CPU
cpu = Maybe CPU
a} :: Device)

-- | The name of the fleet to which this device belongs.
device_fleetName :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_fleetName :: Lens' Device (Maybe Text)
device_fleetName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
fleetName :: Maybe Text
$sel:fleetName:Device' :: Device -> Maybe Text
fleetName} -> Maybe Text
fleetName) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:fleetName:Device' :: Maybe Text
fleetName = Maybe Text
a} :: Device)

-- | The type of fleet to which this device belongs. Possible values are
-- PRIVATE and PUBLIC.
device_fleetType :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_fleetType :: Lens' Device (Maybe Text)
device_fleetType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
fleetType :: Maybe Text
$sel:fleetType:Device' :: Device -> Maybe Text
fleetType} -> Maybe Text
fleetType) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:fleetType:Device' :: Maybe Text
fleetType = Maybe Text
a} :: Device)

-- | The device\'s form factor.
--
-- Allowed values include:
--
-- -   PHONE
--
-- -   TABLET
device_formFactor :: Lens.Lens' Device (Prelude.Maybe DeviceFormFactor)
device_formFactor :: Lens' Device (Maybe DeviceFormFactor)
device_formFactor = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DeviceFormFactor
formFactor :: Maybe DeviceFormFactor
$sel:formFactor:Device' :: Device -> Maybe DeviceFormFactor
formFactor} -> Maybe DeviceFormFactor
formFactor) (\s :: Device
s@Device' {} Maybe DeviceFormFactor
a -> Device
s {$sel:formFactor:Device' :: Maybe DeviceFormFactor
formFactor = Maybe DeviceFormFactor
a} :: Device)

-- | The device\'s heap size, expressed in bytes.
device_heapSize :: Lens.Lens' Device (Prelude.Maybe Prelude.Integer)
device_heapSize :: Lens' Device (Maybe Integer)
device_heapSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Integer
heapSize :: Maybe Integer
$sel:heapSize:Device' :: Device -> Maybe Integer
heapSize} -> Maybe Integer
heapSize) (\s :: Device
s@Device' {} Maybe Integer
a -> Device
s {$sel:heapSize:Device' :: Maybe Integer
heapSize = Maybe Integer
a} :: Device)

-- | The device\'s image name.
device_image :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_image :: Lens' Device (Maybe Text)
device_image = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
image :: Maybe Text
$sel:image:Device' :: Device -> Maybe Text
image} -> Maybe Text
image) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:image:Device' :: Maybe Text
image = Maybe Text
a} :: Device)

-- | The instances that belong to this device.
device_instances :: Lens.Lens' Device (Prelude.Maybe [DeviceInstance])
device_instances :: Lens' Device (Maybe [DeviceInstance])
device_instances = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe [DeviceInstance]
instances :: Maybe [DeviceInstance]
$sel:instances:Device' :: Device -> Maybe [DeviceInstance]
instances} -> Maybe [DeviceInstance]
instances) (\s :: Device
s@Device' {} Maybe [DeviceInstance]
a -> Device
s {$sel:instances:Device' :: Maybe [DeviceInstance]
instances = Maybe [DeviceInstance]
a} :: Device) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The device\'s manufacturer name.
device_manufacturer :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_manufacturer :: Lens' Device (Maybe Text)
device_manufacturer = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
manufacturer :: Maybe Text
$sel:manufacturer:Device' :: Device -> Maybe Text
manufacturer} -> Maybe Text
manufacturer) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:manufacturer:Device' :: Maybe Text
manufacturer = Maybe Text
a} :: Device)

-- | The device\'s total memory size, expressed in bytes.
device_memory :: Lens.Lens' Device (Prelude.Maybe Prelude.Integer)
device_memory :: Lens' Device (Maybe Integer)
device_memory = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Integer
memory :: Maybe Integer
$sel:memory:Device' :: Device -> Maybe Integer
memory} -> Maybe Integer
memory) (\s :: Device
s@Device' {} Maybe Integer
a -> Device
s {$sel:memory:Device' :: Maybe Integer
memory = Maybe Integer
a} :: Device)

-- | The device\'s model name.
device_model :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_model :: Lens' Device (Maybe Text)
device_model = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
model :: Maybe Text
$sel:model:Device' :: Device -> Maybe Text
model} -> Maybe Text
model) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:model:Device' :: Maybe Text
model = Maybe Text
a} :: Device)

-- | The device\'s model ID.
device_modelId :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_modelId :: Lens' Device (Maybe Text)
device_modelId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
modelId :: Maybe Text
$sel:modelId:Device' :: Device -> Maybe Text
modelId} -> Maybe Text
modelId) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:modelId:Device' :: Maybe Text
modelId = Maybe Text
a} :: Device)

-- | The device\'s display name.
device_name :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_name :: Lens' Device (Maybe Text)
device_name = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
name :: Maybe Text
$sel:name:Device' :: Device -> Maybe Text
name} -> Maybe Text
name) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:name:Device' :: Maybe Text
name = Maybe Text
a} :: Device)

-- | The device\'s operating system type.
device_os :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_os :: Lens' Device (Maybe Text)
device_os = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
os :: Maybe Text
$sel:os:Device' :: Device -> Maybe Text
os} -> Maybe Text
os) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:os:Device' :: Maybe Text
os = Maybe Text
a} :: Device)

-- | The device\'s platform.
--
-- Allowed values include:
--
-- -   ANDROID
--
-- -   IOS
device_platform :: Lens.Lens' Device (Prelude.Maybe DevicePlatform)
device_platform :: Lens' Device (Maybe DevicePlatform)
device_platform = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe DevicePlatform
platform :: Maybe DevicePlatform
$sel:platform:Device' :: Device -> Maybe DevicePlatform
platform} -> Maybe DevicePlatform
platform) (\s :: Device
s@Device' {} Maybe DevicePlatform
a -> Device
s {$sel:platform:Device' :: Maybe DevicePlatform
platform = Maybe DevicePlatform
a} :: Device)

-- | The device\'s radio.
device_radio :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_radio :: Lens' Device (Maybe Text)
device_radio = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Text
radio :: Maybe Text
$sel:radio:Device' :: Device -> Maybe Text
radio} -> Maybe Text
radio) (\s :: Device
s@Device' {} Maybe Text
a -> Device
s {$sel:radio:Device' :: Maybe Text
radio = Maybe Text
a} :: Device)

-- | Specifies whether remote access has been enabled for the specified
-- device.
device_remoteAccessEnabled :: Lens.Lens' Device (Prelude.Maybe Prelude.Bool)
device_remoteAccessEnabled :: Lens' Device (Maybe Bool)
device_remoteAccessEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Bool
remoteAccessEnabled :: Maybe Bool
$sel:remoteAccessEnabled:Device' :: Device -> Maybe Bool
remoteAccessEnabled} -> Maybe Bool
remoteAccessEnabled) (\s :: Device
s@Device' {} Maybe Bool
a -> Device
s {$sel:remoteAccessEnabled:Device' :: Maybe Bool
remoteAccessEnabled = Maybe Bool
a} :: Device)

-- | This flag is set to @true@ if remote debugging is enabled for the
-- device.
--
-- Remote debugging is
-- <https://docs.aws.amazon.com/devicefarm/latest/developerguide/history.html no longer supported>.
device_remoteDebugEnabled :: Lens.Lens' Device (Prelude.Maybe Prelude.Bool)
device_remoteDebugEnabled :: Lens' Device (Maybe Bool)
device_remoteDebugEnabled = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Bool
remoteDebugEnabled :: Maybe Bool
$sel:remoteDebugEnabled:Device' :: Device -> Maybe Bool
remoteDebugEnabled} -> Maybe Bool
remoteDebugEnabled) (\s :: Device
s@Device' {} Maybe Bool
a -> Device
s {$sel:remoteDebugEnabled:Device' :: Maybe Bool
remoteDebugEnabled = Maybe Bool
a} :: Device)

-- | The resolution of the device.
device_resolution :: Lens.Lens' Device (Prelude.Maybe Resolution)
device_resolution :: Lens' Device (Maybe Resolution)
device_resolution = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\Device' {Maybe Resolution
resolution :: Maybe Resolution
$sel:resolution:Device' :: Device -> Maybe Resolution
resolution} -> Maybe Resolution
resolution) (\s :: Device
s@Device' {} Maybe Resolution
a -> Device
s {$sel:resolution:Device' :: Maybe Resolution
resolution = Maybe Resolution
a} :: Device)

instance Data.FromJSON Device where
  parseJSON :: Value -> Parser Device
parseJSON =
    forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
      String
"Device"
      ( \Object
x ->
          Maybe Text
-> Maybe DeviceAvailability
-> Maybe Text
-> Maybe CPU
-> Maybe Text
-> Maybe Text
-> Maybe DeviceFormFactor
-> Maybe Integer
-> Maybe Text
-> Maybe [DeviceInstance]
-> Maybe Text
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DevicePlatform
-> Maybe Text
-> Maybe Bool
-> Maybe Bool
-> Maybe Resolution
-> Device
Device'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"arn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"availability")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"carrier")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"cpu")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fleetName")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"fleetType")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"formFactor")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"heapSize")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"image")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"instances" forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty)
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"manufacturer")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"memory")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"model")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"modelId")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"name")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"os")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"platform")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"radio")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"remoteAccessEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"remoteDebugEnabled")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"resolution")
      )

instance Prelude.Hashable Device where
  hashWithSalt :: Int -> Device -> Int
hashWithSalt Int
_salt Device' {Maybe Bool
Maybe Integer
Maybe [DeviceInstance]
Maybe Text
Maybe CPU
Maybe DeviceAvailability
Maybe DeviceFormFactor
Maybe DevicePlatform
Maybe Resolution
resolution :: Maybe Resolution
remoteDebugEnabled :: Maybe Bool
remoteAccessEnabled :: Maybe Bool
radio :: Maybe Text
platform :: Maybe DevicePlatform
os :: Maybe Text
name :: Maybe Text
modelId :: Maybe Text
model :: Maybe Text
memory :: Maybe Integer
manufacturer :: Maybe Text
instances :: Maybe [DeviceInstance]
image :: Maybe Text
heapSize :: Maybe Integer
formFactor :: Maybe DeviceFormFactor
fleetType :: Maybe Text
fleetName :: Maybe Text
cpu :: Maybe CPU
carrier :: Maybe Text
availability :: Maybe DeviceAvailability
arn :: Maybe Text
$sel:resolution:Device' :: Device -> Maybe Resolution
$sel:remoteDebugEnabled:Device' :: Device -> Maybe Bool
$sel:remoteAccessEnabled:Device' :: Device -> Maybe Bool
$sel:radio:Device' :: Device -> Maybe Text
$sel:platform:Device' :: Device -> Maybe DevicePlatform
$sel:os:Device' :: Device -> Maybe Text
$sel:name:Device' :: Device -> Maybe Text
$sel:modelId:Device' :: Device -> Maybe Text
$sel:model:Device' :: Device -> Maybe Text
$sel:memory:Device' :: Device -> Maybe Integer
$sel:manufacturer:Device' :: Device -> Maybe Text
$sel:instances:Device' :: Device -> Maybe [DeviceInstance]
$sel:image:Device' :: Device -> Maybe Text
$sel:heapSize:Device' :: Device -> Maybe Integer
$sel:formFactor:Device' :: Device -> Maybe DeviceFormFactor
$sel:fleetType:Device' :: Device -> Maybe Text
$sel:fleetName:Device' :: Device -> Maybe Text
$sel:cpu:Device' :: Device -> Maybe CPU
$sel:carrier:Device' :: Device -> Maybe Text
$sel:availability:Device' :: Device -> Maybe DeviceAvailability
$sel:arn:Device' :: Device -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceAvailability
availability
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
carrier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe CPU
cpu
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
fleetType
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DeviceFormFactor
formFactor
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
heapSize
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
image
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [DeviceInstance]
instances
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
manufacturer
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Integer
memory
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
model
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
modelId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
name
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
os
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe DevicePlatform
platform
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
radio
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
remoteAccessEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
remoteDebugEnabled
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Resolution
resolution

instance Prelude.NFData Device where
  rnf :: Device -> ()
rnf Device' {Maybe Bool
Maybe Integer
Maybe [DeviceInstance]
Maybe Text
Maybe CPU
Maybe DeviceAvailability
Maybe DeviceFormFactor
Maybe DevicePlatform
Maybe Resolution
resolution :: Maybe Resolution
remoteDebugEnabled :: Maybe Bool
remoteAccessEnabled :: Maybe Bool
radio :: Maybe Text
platform :: Maybe DevicePlatform
os :: Maybe Text
name :: Maybe Text
modelId :: Maybe Text
model :: Maybe Text
memory :: Maybe Integer
manufacturer :: Maybe Text
instances :: Maybe [DeviceInstance]
image :: Maybe Text
heapSize :: Maybe Integer
formFactor :: Maybe DeviceFormFactor
fleetType :: Maybe Text
fleetName :: Maybe Text
cpu :: Maybe CPU
carrier :: Maybe Text
availability :: Maybe DeviceAvailability
arn :: Maybe Text
$sel:resolution:Device' :: Device -> Maybe Resolution
$sel:remoteDebugEnabled:Device' :: Device -> Maybe Bool
$sel:remoteAccessEnabled:Device' :: Device -> Maybe Bool
$sel:radio:Device' :: Device -> Maybe Text
$sel:platform:Device' :: Device -> Maybe DevicePlatform
$sel:os:Device' :: Device -> Maybe Text
$sel:name:Device' :: Device -> Maybe Text
$sel:modelId:Device' :: Device -> Maybe Text
$sel:model:Device' :: Device -> Maybe Text
$sel:memory:Device' :: Device -> Maybe Integer
$sel:manufacturer:Device' :: Device -> Maybe Text
$sel:instances:Device' :: Device -> Maybe [DeviceInstance]
$sel:image:Device' :: Device -> Maybe Text
$sel:heapSize:Device' :: Device -> Maybe Integer
$sel:formFactor:Device' :: Device -> Maybe DeviceFormFactor
$sel:fleetType:Device' :: Device -> Maybe Text
$sel:fleetName:Device' :: Device -> Maybe Text
$sel:cpu:Device' :: Device -> Maybe CPU
$sel:carrier:Device' :: Device -> Maybe Text
$sel:availability:Device' :: Device -> Maybe DeviceAvailability
$sel:arn:Device' :: Device -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceAvailability
availability
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
carrier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe CPU
cpu
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
fleetType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DeviceFormFactor
formFactor
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
heapSize
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
image
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [DeviceInstance]
instances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
manufacturer
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Integer
memory
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
model
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
modelId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
name
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
os
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe DevicePlatform
platform
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
radio
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
remoteAccessEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
remoteDebugEnabled
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Resolution
resolution