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