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