{-# 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 #-}
module Amazonka.Braket.Types.DeviceSummary where
import Amazonka.Braket.Types.DeviceStatus
import Amazonka.Braket.Types.DeviceType
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data DeviceSummary = DeviceSummary'
{
DeviceSummary -> Text
deviceArn :: Prelude.Text,
DeviceSummary -> Text
deviceName :: Prelude.Text,
DeviceSummary -> DeviceStatus
deviceStatus :: DeviceStatus,
DeviceSummary -> DeviceType
deviceType :: DeviceType,
DeviceSummary -> Text
providerName :: Prelude.Text
}
deriving (DeviceSummary -> DeviceSummary -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeviceSummary -> DeviceSummary -> Bool
$c/= :: DeviceSummary -> DeviceSummary -> Bool
== :: DeviceSummary -> DeviceSummary -> Bool
$c== :: DeviceSummary -> DeviceSummary -> Bool
Prelude.Eq, ReadPrec [DeviceSummary]
ReadPrec DeviceSummary
Int -> ReadS DeviceSummary
ReadS [DeviceSummary]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeviceSummary]
$creadListPrec :: ReadPrec [DeviceSummary]
readPrec :: ReadPrec DeviceSummary
$creadPrec :: ReadPrec DeviceSummary
readList :: ReadS [DeviceSummary]
$creadList :: ReadS [DeviceSummary]
readsPrec :: Int -> ReadS DeviceSummary
$creadsPrec :: Int -> ReadS DeviceSummary
Prelude.Read, Int -> DeviceSummary -> ShowS
[DeviceSummary] -> ShowS
DeviceSummary -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeviceSummary] -> ShowS
$cshowList :: [DeviceSummary] -> ShowS
show :: DeviceSummary -> String
$cshow :: DeviceSummary -> String
showsPrec :: Int -> DeviceSummary -> ShowS
$cshowsPrec :: Int -> DeviceSummary -> ShowS
Prelude.Show, forall x. Rep DeviceSummary x -> DeviceSummary
forall x. DeviceSummary -> Rep DeviceSummary x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeviceSummary x -> DeviceSummary
$cfrom :: forall x. DeviceSummary -> Rep DeviceSummary x
Prelude.Generic)
newDeviceSummary ::
Prelude.Text ->
Prelude.Text ->
DeviceStatus ->
DeviceType ->
Prelude.Text ->
DeviceSummary
newDeviceSummary :: Text -> Text -> DeviceStatus -> DeviceType -> Text -> DeviceSummary
newDeviceSummary
Text
pDeviceArn_
Text
pDeviceName_
DeviceStatus
pDeviceStatus_
DeviceType
pDeviceType_
Text
pProviderName_ =
DeviceSummary'
{ $sel:deviceArn:DeviceSummary' :: Text
deviceArn = Text
pDeviceArn_,
$sel:deviceName:DeviceSummary' :: Text
deviceName = Text
pDeviceName_,
$sel:deviceStatus:DeviceSummary' :: DeviceStatus
deviceStatus = DeviceStatus
pDeviceStatus_,
$sel:deviceType:DeviceSummary' :: DeviceType
deviceType = DeviceType
pDeviceType_,
$sel:providerName:DeviceSummary' :: Text
providerName = Text
pProviderName_
}
deviceSummary_deviceArn :: Lens.Lens' DeviceSummary Prelude.Text
deviceSummary_deviceArn :: Lens' DeviceSummary Text
deviceSummary_deviceArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSummary' {Text
deviceArn :: Text
$sel:deviceArn:DeviceSummary' :: DeviceSummary -> Text
deviceArn} -> Text
deviceArn) (\s :: DeviceSummary
s@DeviceSummary' {} Text
a -> DeviceSummary
s {$sel:deviceArn:DeviceSummary' :: Text
deviceArn = Text
a} :: DeviceSummary)
deviceSummary_deviceName :: Lens.Lens' DeviceSummary Prelude.Text
deviceSummary_deviceName :: Lens' DeviceSummary Text
deviceSummary_deviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSummary' {Text
deviceName :: Text
$sel:deviceName:DeviceSummary' :: DeviceSummary -> Text
deviceName} -> Text
deviceName) (\s :: DeviceSummary
s@DeviceSummary' {} Text
a -> DeviceSummary
s {$sel:deviceName:DeviceSummary' :: Text
deviceName = Text
a} :: DeviceSummary)
deviceSummary_deviceStatus :: Lens.Lens' DeviceSummary DeviceStatus
deviceSummary_deviceStatus :: Lens' DeviceSummary DeviceStatus
deviceSummary_deviceStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSummary' {DeviceStatus
deviceStatus :: DeviceStatus
$sel:deviceStatus:DeviceSummary' :: DeviceSummary -> DeviceStatus
deviceStatus} -> DeviceStatus
deviceStatus) (\s :: DeviceSummary
s@DeviceSummary' {} DeviceStatus
a -> DeviceSummary
s {$sel:deviceStatus:DeviceSummary' :: DeviceStatus
deviceStatus = DeviceStatus
a} :: DeviceSummary)
deviceSummary_deviceType :: Lens.Lens' DeviceSummary DeviceType
deviceSummary_deviceType :: Lens' DeviceSummary DeviceType
deviceSummary_deviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSummary' {DeviceType
deviceType :: DeviceType
$sel:deviceType:DeviceSummary' :: DeviceSummary -> DeviceType
deviceType} -> DeviceType
deviceType) (\s :: DeviceSummary
s@DeviceSummary' {} DeviceType
a -> DeviceSummary
s {$sel:deviceType:DeviceSummary' :: DeviceType
deviceType = DeviceType
a} :: DeviceSummary)
deviceSummary_providerName :: Lens.Lens' DeviceSummary Prelude.Text
deviceSummary_providerName :: Lens' DeviceSummary Text
deviceSummary_providerName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeviceSummary' {Text
providerName :: Text
$sel:providerName:DeviceSummary' :: DeviceSummary -> Text
providerName} -> Text
providerName) (\s :: DeviceSummary
s@DeviceSummary' {} Text
a -> DeviceSummary
s {$sel:providerName:DeviceSummary' :: Text
providerName = Text
a} :: DeviceSummary)
instance Data.FromJSON DeviceSummary where
parseJSON :: Value -> Parser DeviceSummary
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"DeviceSummary"
( \Object
x ->
Text -> Text -> DeviceStatus -> DeviceType -> Text -> DeviceSummary
DeviceSummary'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deviceArn")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deviceName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deviceStatus")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"deviceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"providerName")
)
instance Prelude.Hashable DeviceSummary where
hashWithSalt :: Int -> DeviceSummary -> Int
hashWithSalt Int
_salt DeviceSummary' {Text
DeviceStatus
DeviceType
providerName :: Text
deviceType :: DeviceType
deviceStatus :: DeviceStatus
deviceName :: Text
deviceArn :: Text
$sel:providerName:DeviceSummary' :: DeviceSummary -> Text
$sel:deviceType:DeviceSummary' :: DeviceSummary -> DeviceType
$sel:deviceStatus:DeviceSummary' :: DeviceSummary -> DeviceStatus
$sel:deviceName:DeviceSummary' :: DeviceSummary -> Text
$sel:deviceArn:DeviceSummary' :: DeviceSummary -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceArn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
deviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DeviceStatus
deviceStatus
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` DeviceType
deviceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
providerName
instance Prelude.NFData DeviceSummary where
rnf :: DeviceSummary -> ()
rnf DeviceSummary' {Text
DeviceStatus
DeviceType
providerName :: Text
deviceType :: DeviceType
deviceStatus :: DeviceStatus
deviceName :: Text
deviceArn :: Text
$sel:providerName:DeviceSummary' :: DeviceSummary -> Text
$sel:deviceType:DeviceSummary' :: DeviceSummary -> DeviceType
$sel:deviceStatus:DeviceSummary' :: DeviceSummary -> DeviceStatus
$sel:deviceName:DeviceSummary' :: DeviceSummary -> Text
$sel:deviceArn:DeviceSummary' :: DeviceSummary -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
deviceArn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
deviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DeviceStatus
deviceStatus
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf DeviceType
deviceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
providerName