{-# 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.SecurityHub.Types.AwsEcsTaskDefinitionInferenceAcceleratorsDetails where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data AwsEcsTaskDefinitionInferenceAcceleratorsDetails = AwsEcsTaskDefinitionInferenceAcceleratorsDetails'
{
AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
deviceName :: Prelude.Maybe Prelude.Text,
AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
deviceType :: Prelude.Maybe Prelude.Text
}
deriving (AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool
(AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool)
-> (AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool)
-> Eq AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool
$c/= :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool
== :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool
$c== :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Bool
Prelude.Eq, ReadPrec [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
ReadPrec AwsEcsTaskDefinitionInferenceAcceleratorsDetails
Int -> ReadS AwsEcsTaskDefinitionInferenceAcceleratorsDetails
ReadS [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
(Int -> ReadS AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> ReadS [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
-> ReadPrec AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> ReadPrec [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
-> Read AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
$creadListPrec :: ReadPrec [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
readPrec :: ReadPrec AwsEcsTaskDefinitionInferenceAcceleratorsDetails
$creadPrec :: ReadPrec AwsEcsTaskDefinitionInferenceAcceleratorsDetails
readList :: ReadS [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
$creadList :: ReadS [AwsEcsTaskDefinitionInferenceAcceleratorsDetails]
readsPrec :: Int -> ReadS AwsEcsTaskDefinitionInferenceAcceleratorsDetails
$creadsPrec :: Int -> ReadS AwsEcsTaskDefinitionInferenceAcceleratorsDetails
Prelude.Read, Int -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> ShowS
[AwsEcsTaskDefinitionInferenceAcceleratorsDetails] -> ShowS
AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> String
(Int -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> ShowS)
-> (AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> String)
-> ([AwsEcsTaskDefinitionInferenceAcceleratorsDetails] -> ShowS)
-> Show AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AwsEcsTaskDefinitionInferenceAcceleratorsDetails] -> ShowS
$cshowList :: [AwsEcsTaskDefinitionInferenceAcceleratorsDetails] -> ShowS
show :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> String
$cshow :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> String
showsPrec :: Int -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> ShowS
$cshowsPrec :: Int -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> ShowS
Prelude.Show, (forall x.
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x)
-> (forall x.
Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Generic AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall x.
Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall x.
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
$cfrom :: forall x.
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> Rep AwsEcsTaskDefinitionInferenceAcceleratorsDetails x
Prelude.Generic)
newAwsEcsTaskDefinitionInferenceAcceleratorsDetails ::
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
newAwsEcsTaskDefinitionInferenceAcceleratorsDetails :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
newAwsEcsTaskDefinitionInferenceAcceleratorsDetails =
AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: Maybe Text
-> Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
AwsEcsTaskDefinitionInferenceAcceleratorsDetails'
{ $sel:deviceName:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: Maybe Text
deviceName =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:deviceType:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: Maybe Text
deviceType =
Maybe Text
forall a. Maybe a
Prelude.Nothing
}
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceName :: Lens.Lens' AwsEcsTaskDefinitionInferenceAcceleratorsDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceName :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> f AwsEcsTaskDefinitionInferenceAcceleratorsDetails
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceName = (AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text)
-> (AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Lens
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionInferenceAcceleratorsDetails' {Maybe Text
deviceName :: Maybe Text
$sel:deviceName:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
deviceName} -> Maybe Text
deviceName) (\s :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
s@AwsEcsTaskDefinitionInferenceAcceleratorsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
s {$sel:deviceName:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: Maybe Text
deviceName = Maybe Text
a} :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceType :: Lens.Lens' AwsEcsTaskDefinitionInferenceAcceleratorsDetails (Prelude.Maybe Prelude.Text)
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceType :: (Maybe Text -> f (Maybe Text))
-> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> f AwsEcsTaskDefinitionInferenceAcceleratorsDetails
awsEcsTaskDefinitionInferenceAcceleratorsDetails_deviceType = (AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text)
-> (AwsEcsTaskDefinitionInferenceAcceleratorsDetails
-> Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Lens
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AwsEcsTaskDefinitionInferenceAcceleratorsDetails' {Maybe Text
deviceType :: Maybe Text
$sel:deviceType:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
deviceType} -> Maybe Text
deviceType) (\s :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails
s@AwsEcsTaskDefinitionInferenceAcceleratorsDetails' {} Maybe Text
a -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
s {$sel:deviceType:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: Maybe Text
deviceType = Maybe Text
a} :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
instance
Core.FromJSON
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
where
parseJSON :: Value -> Parser AwsEcsTaskDefinitionInferenceAcceleratorsDetails
parseJSON =
String
-> (Object
-> Parser AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Value
-> Parser AwsEcsTaskDefinitionInferenceAcceleratorsDetails
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"AwsEcsTaskDefinitionInferenceAcceleratorsDetails"
( \Object
x ->
Maybe Text
-> Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails
AwsEcsTaskDefinitionInferenceAcceleratorsDetails'
(Maybe Text
-> Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
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
"DeviceName")
Parser
(Maybe Text -> AwsEcsTaskDefinitionInferenceAcceleratorsDetails)
-> Parser (Maybe Text)
-> Parser AwsEcsTaskDefinitionInferenceAcceleratorsDetails
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
"DeviceType")
)
instance
Prelude.Hashable
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
instance
Prelude.NFData
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
instance
Core.ToJSON
AwsEcsTaskDefinitionInferenceAcceleratorsDetails
where
toJSON :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Value
toJSON
AwsEcsTaskDefinitionInferenceAcceleratorsDetails' {Maybe Text
deviceType :: Maybe Text
deviceName :: Maybe Text
$sel:deviceType:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
$sel:deviceName:AwsEcsTaskDefinitionInferenceAcceleratorsDetails' :: AwsEcsTaskDefinitionInferenceAcceleratorsDetails -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"DeviceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deviceName,
(Text
"DeviceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
deviceType
]
)