{-# 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-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.DeviceFarm.Types.Device where

import qualified Amazonka.Core as Core
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.Lens as Lens
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 carrier.
    Device -> Maybe Text
carrier :: Prelude.Maybe Prelude.Text,
    -- | The device\'s image name.
    Device -> Maybe Text
image :: Prelude.Maybe Prelude.Text,
    -- | The device\'s manufacturer name.
    Device -> Maybe Text
manufacturer :: Prelude.Maybe Prelude.Text,
    -- | The device\'s platform.
    --
    -- Allowed values include:
    --
    -- -   ANDROID
    --
    -- -   IOS
    Device -> Maybe DevicePlatform
platform :: Prelude.Maybe DevicePlatform,
    -- | The device\'s model ID.
    Device -> Maybe Text
modelId :: Prelude.Maybe Prelude.Text,
    -- | Specifies whether remote access has been enabled for the specified
    -- device.
    Device -> Maybe Bool
remoteAccessEnabled :: Prelude.Maybe Prelude.Bool,
    -- | The device\'s ARN.
    Device -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
    -- | The device\'s form factor.
    --
    -- Allowed values include:
    --
    -- -   PHONE
    --
    -- -   TABLET
    Device -> Maybe DeviceFormFactor
formFactor :: Prelude.Maybe DeviceFormFactor,
    -- | The type of fleet to which this device belongs. Possible values are
    -- PRIVATE and PUBLIC.
    Device -> Maybe Text
fleetType :: Prelude.Maybe Prelude.Text,
    -- | The resolution of the device.
    Device -> Maybe Resolution
resolution :: Prelude.Maybe Resolution,
    -- | 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 total memory size, expressed in bytes.
    Device -> Maybe Integer
memory :: Prelude.Maybe Prelude.Integer,
    -- | The device\'s radio.
    Device -> Maybe Text
radio :: Prelude.Maybe Prelude.Text,
    -- | The device\'s operating system type.
    Device -> Maybe Text
os :: Prelude.Maybe Prelude.Text,
    -- | The device\'s display name.
    Device -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
    -- | The device\'s model name.
    Device -> Maybe Text
model :: Prelude.Maybe Prelude.Text,
    -- | The instances that belong to this device.
    Device -> Maybe [DeviceInstance]
instances :: Prelude.Maybe [DeviceInstance],
    -- | 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,
    -- | Information about the device\'s CPU.
    Device -> Maybe CPU
cpu :: Prelude.Maybe CPU,
    -- | The device\'s heap size, expressed in bytes.
    Device -> Maybe Integer
heapSize :: Prelude.Maybe Prelude.Integer,
    -- | The name of the fleet to which this device belongs.
    Device -> Maybe Text
fleetName :: Prelude.Maybe Prelude.Text
  }
  deriving (Device -> Device -> Bool
(Device -> Device -> Bool)
-> (Device -> Device -> Bool) -> Eq Device
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]
(Int -> ReadS Device)
-> ReadS [Device]
-> ReadPrec Device
-> ReadPrec [Device]
-> Read 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
(Int -> Device -> ShowS)
-> (Device -> String) -> ([Device] -> ShowS) -> Show Device
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. Device -> Rep Device x)
-> (forall x. Rep Device x -> Device) -> Generic Device
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:
--
-- 'carrier', 'device_carrier' - The device\'s carrier.
--
-- 'image', 'device_image' - The device\'s image name.
--
-- 'manufacturer', 'device_manufacturer' - The device\'s manufacturer name.
--
-- 'platform', 'device_platform' - The device\'s platform.
--
-- Allowed values include:
--
-- -   ANDROID
--
-- -   IOS
--
-- 'modelId', 'device_modelId' - The device\'s model ID.
--
-- 'remoteAccessEnabled', 'device_remoteAccessEnabled' - Specifies whether remote access has been enabled for the specified
-- device.
--
-- 'arn', 'device_arn' - The device\'s ARN.
--
-- 'formFactor', 'device_formFactor' - The device\'s form factor.
--
-- Allowed values include:
--
-- -   PHONE
--
-- -   TABLET
--
-- 'fleetType', 'device_fleetType' - The type of fleet to which this device belongs. Possible values are
-- PRIVATE and PUBLIC.
--
-- 'resolution', 'device_resolution' - The resolution of the device.
--
-- 'availability', 'device_availability' - Indicates how likely a device is available for a test run. Currently
-- available in the ListDevices and GetDevice API methods.
--
-- 'memory', 'device_memory' - The device\'s total memory size, expressed in bytes.
--
-- 'radio', 'device_radio' - The device\'s radio.
--
-- 'os', 'device_os' - The device\'s operating system type.
--
-- 'name', 'device_name' - The device\'s display name.
--
-- 'model', 'device_model' - The device\'s model name.
--
-- 'instances', 'device_instances' - The instances that belong to this 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>.
--
-- 'cpu', 'device_cpu' - Information about the device\'s CPU.
--
-- 'heapSize', 'device_heapSize' - The device\'s heap size, expressed in bytes.
--
-- 'fleetName', 'device_fleetName' - The name of the fleet to which this device belongs.
newDevice ::
  Device
newDevice :: Device
newDevice =
  Device' :: Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe DevicePlatform
-> Maybe Text
-> Maybe Bool
-> Maybe Text
-> Maybe DeviceFormFactor
-> Maybe Text
-> Maybe Resolution
-> Maybe DeviceAvailability
-> Maybe Integer
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe [DeviceInstance]
-> Maybe Bool
-> Maybe CPU
-> Maybe Integer
-> Maybe Text
-> Device
Device'
    { $sel:carrier:Device' :: Maybe Text
carrier = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:image:Device' :: Maybe Text
image = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:manufacturer:Device' :: Maybe Text
manufacturer = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:platform:Device' :: Maybe DevicePlatform
platform = Maybe DevicePlatform
forall a. Maybe a
Prelude.Nothing,
      $sel:modelId:Device' :: Maybe Text
modelId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteAccessEnabled:Device' :: Maybe Bool
remoteAccessEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:arn:Device' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:formFactor:Device' :: Maybe DeviceFormFactor
formFactor = Maybe DeviceFormFactor
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetType:Device' :: Maybe Text
fleetType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:resolution:Device' :: Maybe Resolution
resolution = Maybe Resolution
forall a. Maybe a
Prelude.Nothing,
      $sel:availability:Device' :: Maybe DeviceAvailability
availability = Maybe DeviceAvailability
forall a. Maybe a
Prelude.Nothing,
      $sel:memory:Device' :: Maybe Integer
memory = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:radio:Device' :: Maybe Text
radio = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:os:Device' :: Maybe Text
os = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:name:Device' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:model:Device' :: Maybe Text
model = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:instances:Device' :: Maybe [DeviceInstance]
instances = Maybe [DeviceInstance]
forall a. Maybe a
Prelude.Nothing,
      $sel:remoteDebugEnabled:Device' :: Maybe Bool
remoteDebugEnabled = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:cpu:Device' :: Maybe CPU
cpu = Maybe CPU
forall a. Maybe a
Prelude.Nothing,
      $sel:heapSize:Device' :: Maybe Integer
heapSize = Maybe Integer
forall a. Maybe a
Prelude.Nothing,
      $sel:fleetName:Device' :: Maybe Text
fleetName = Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | The device\'s carrier.
device_carrier :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_carrier :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_carrier = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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)

-- | The device\'s image name.
device_image :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_image :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_image = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 device\'s manufacturer name.
device_manufacturer :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_manufacturer :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_manufacturer = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 platform.
--
-- Allowed values include:
--
-- -   ANDROID
--
-- -   IOS
device_platform :: Lens.Lens' Device (Prelude.Maybe DevicePlatform)
device_platform :: (Maybe DevicePlatform -> f (Maybe DevicePlatform))
-> Device -> f Device
device_platform = (Device -> Maybe DevicePlatform)
-> (Device -> Maybe DevicePlatform -> Device)
-> Lens Device Device (Maybe DevicePlatform) (Maybe DevicePlatform)
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 model ID.
device_modelId :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_modelId :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_modelId = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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)

-- | Specifies whether remote access has been enabled for the specified
-- device.
device_remoteAccessEnabled :: Lens.Lens' Device (Prelude.Maybe Prelude.Bool)
device_remoteAccessEnabled :: (Maybe Bool -> f (Maybe Bool)) -> Device -> f Device
device_remoteAccessEnabled = (Device -> Maybe Bool)
-> (Device -> Maybe Bool -> Device)
-> Lens Device Device (Maybe Bool) (Maybe Bool)
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)

-- | The device\'s ARN.
device_arn :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_arn :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_arn = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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)

-- | The device\'s form factor.
--
-- Allowed values include:
--
-- -   PHONE
--
-- -   TABLET
device_formFactor :: Lens.Lens' Device (Prelude.Maybe DeviceFormFactor)
device_formFactor :: (Maybe DeviceFormFactor -> f (Maybe DeviceFormFactor))
-> Device -> f Device
device_formFactor = (Device -> Maybe DeviceFormFactor)
-> (Device -> Maybe DeviceFormFactor -> Device)
-> Lens
     Device Device (Maybe DeviceFormFactor) (Maybe DeviceFormFactor)
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 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 :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_fleetType = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 resolution of the device.
device_resolution :: Lens.Lens' Device (Prelude.Maybe Resolution)
device_resolution :: (Maybe Resolution -> f (Maybe Resolution)) -> Device -> f Device
device_resolution = (Device -> Maybe Resolution)
-> (Device -> Maybe Resolution -> Device)
-> Lens Device Device (Maybe Resolution) (Maybe 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)

-- | 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 :: (Maybe DeviceAvailability -> f (Maybe DeviceAvailability))
-> Device -> f Device
device_availability = (Device -> Maybe DeviceAvailability)
-> (Device -> Maybe DeviceAvailability -> Device)
-> Lens
     Device Device (Maybe DeviceAvailability) (Maybe DeviceAvailability)
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 total memory size, expressed in bytes.
device_memory :: Lens.Lens' Device (Prelude.Maybe Prelude.Integer)
device_memory :: (Maybe Integer -> f (Maybe Integer)) -> Device -> f Device
device_memory = (Device -> Maybe Integer)
-> (Device -> Maybe Integer -> Device)
-> Lens Device Device (Maybe Integer) (Maybe Integer)
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 radio.
device_radio :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_radio :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_radio = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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)

-- | The device\'s operating system type.
device_os :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_os :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_os = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 display name.
device_name :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_name :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_name = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 model name.
device_model :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_model :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_model = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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 instances that belong to this device.
device_instances :: Lens.Lens' Device (Prelude.Maybe [DeviceInstance])
device_instances :: (Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> Device -> f Device
device_instances = (Device -> Maybe [DeviceInstance])
-> (Device -> Maybe [DeviceInstance] -> Device)
-> Lens
     Device Device (Maybe [DeviceInstance]) (Maybe [DeviceInstance])
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) ((Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
 -> Device -> f Device)
-> ((Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
    -> Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> (Maybe [DeviceInstance] -> f (Maybe [DeviceInstance]))
-> Device
-> f Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [DeviceInstance] [DeviceInstance] [DeviceInstance] [DeviceInstance]
-> Iso
     (Maybe [DeviceInstance])
     (Maybe [DeviceInstance])
     (Maybe [DeviceInstance])
     (Maybe [DeviceInstance])
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 AnIso
  [DeviceInstance] [DeviceInstance] [DeviceInstance] [DeviceInstance]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | 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 :: (Maybe Bool -> f (Maybe Bool)) -> Device -> f Device
device_remoteDebugEnabled = (Device -> Maybe Bool)
-> (Device -> Maybe Bool -> Device)
-> Lens Device Device (Maybe Bool) (Maybe Bool)
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)

-- | Information about the device\'s CPU.
device_cpu :: Lens.Lens' Device (Prelude.Maybe CPU)
device_cpu :: (Maybe CPU -> f (Maybe CPU)) -> Device -> f Device
device_cpu = (Device -> Maybe CPU)
-> (Device -> Maybe CPU -> Device)
-> Lens Device Device (Maybe CPU) (Maybe 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 device\'s heap size, expressed in bytes.
device_heapSize :: Lens.Lens' Device (Prelude.Maybe Prelude.Integer)
device_heapSize :: (Maybe Integer -> f (Maybe Integer)) -> Device -> f Device
device_heapSize = (Device -> Maybe Integer)
-> (Device -> Maybe Integer -> Device)
-> Lens Device Device (Maybe Integer) (Maybe Integer)
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 name of the fleet to which this device belongs.
device_fleetName :: Lens.Lens' Device (Prelude.Maybe Prelude.Text)
device_fleetName :: (Maybe Text -> f (Maybe Text)) -> Device -> f Device
device_fleetName = (Device -> Maybe Text)
-> (Device -> Maybe Text -> Device)
-> Lens Device Device (Maybe Text) (Maybe Text)
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)

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

instance Prelude.Hashable Device

instance Prelude.NFData Device