{-# 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.LookoutMetrics.Types.AutoDetectionS3SourceConfig where
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 AutoDetectionS3SourceConfig = AutoDetectionS3SourceConfig'
{
AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
historicalDataPathList :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text),
AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
templatedPathList :: Prelude.Maybe (Prelude.NonEmpty Prelude.Text)
}
deriving (AutoDetectionS3SourceConfig -> AutoDetectionS3SourceConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AutoDetectionS3SourceConfig -> AutoDetectionS3SourceConfig -> Bool
$c/= :: AutoDetectionS3SourceConfig -> AutoDetectionS3SourceConfig -> Bool
== :: AutoDetectionS3SourceConfig -> AutoDetectionS3SourceConfig -> Bool
$c== :: AutoDetectionS3SourceConfig -> AutoDetectionS3SourceConfig -> Bool
Prelude.Eq, ReadPrec [AutoDetectionS3SourceConfig]
ReadPrec AutoDetectionS3SourceConfig
Int -> ReadS AutoDetectionS3SourceConfig
ReadS [AutoDetectionS3SourceConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AutoDetectionS3SourceConfig]
$creadListPrec :: ReadPrec [AutoDetectionS3SourceConfig]
readPrec :: ReadPrec AutoDetectionS3SourceConfig
$creadPrec :: ReadPrec AutoDetectionS3SourceConfig
readList :: ReadS [AutoDetectionS3SourceConfig]
$creadList :: ReadS [AutoDetectionS3SourceConfig]
readsPrec :: Int -> ReadS AutoDetectionS3SourceConfig
$creadsPrec :: Int -> ReadS AutoDetectionS3SourceConfig
Prelude.Read, Int -> AutoDetectionS3SourceConfig -> ShowS
[AutoDetectionS3SourceConfig] -> ShowS
AutoDetectionS3SourceConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AutoDetectionS3SourceConfig] -> ShowS
$cshowList :: [AutoDetectionS3SourceConfig] -> ShowS
show :: AutoDetectionS3SourceConfig -> String
$cshow :: AutoDetectionS3SourceConfig -> String
showsPrec :: Int -> AutoDetectionS3SourceConfig -> ShowS
$cshowsPrec :: Int -> AutoDetectionS3SourceConfig -> ShowS
Prelude.Show, forall x.
Rep AutoDetectionS3SourceConfig x -> AutoDetectionS3SourceConfig
forall x.
AutoDetectionS3SourceConfig -> Rep AutoDetectionS3SourceConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AutoDetectionS3SourceConfig x -> AutoDetectionS3SourceConfig
$cfrom :: forall x.
AutoDetectionS3SourceConfig -> Rep AutoDetectionS3SourceConfig x
Prelude.Generic)
newAutoDetectionS3SourceConfig ::
AutoDetectionS3SourceConfig
newAutoDetectionS3SourceConfig :: AutoDetectionS3SourceConfig
newAutoDetectionS3SourceConfig =
AutoDetectionS3SourceConfig'
{ $sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: Maybe (NonEmpty Text)
historicalDataPathList =
forall a. Maybe a
Prelude.Nothing,
$sel:templatedPathList:AutoDetectionS3SourceConfig' :: Maybe (NonEmpty Text)
templatedPathList = forall a. Maybe a
Prelude.Nothing
}
autoDetectionS3SourceConfig_historicalDataPathList :: Lens.Lens' AutoDetectionS3SourceConfig (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
autoDetectionS3SourceConfig_historicalDataPathList :: Lens' AutoDetectionS3SourceConfig (Maybe (NonEmpty Text))
autoDetectionS3SourceConfig_historicalDataPathList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoDetectionS3SourceConfig' {Maybe (NonEmpty Text)
historicalDataPathList :: Maybe (NonEmpty Text)
$sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
historicalDataPathList} -> Maybe (NonEmpty Text)
historicalDataPathList) (\s :: AutoDetectionS3SourceConfig
s@AutoDetectionS3SourceConfig' {} Maybe (NonEmpty Text)
a -> AutoDetectionS3SourceConfig
s {$sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: Maybe (NonEmpty Text)
historicalDataPathList = Maybe (NonEmpty Text)
a} :: AutoDetectionS3SourceConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
autoDetectionS3SourceConfig_templatedPathList :: Lens.Lens' AutoDetectionS3SourceConfig (Prelude.Maybe (Prelude.NonEmpty Prelude.Text))
autoDetectionS3SourceConfig_templatedPathList :: Lens' AutoDetectionS3SourceConfig (Maybe (NonEmpty Text))
autoDetectionS3SourceConfig_templatedPathList = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AutoDetectionS3SourceConfig' {Maybe (NonEmpty Text)
templatedPathList :: Maybe (NonEmpty Text)
$sel:templatedPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
templatedPathList} -> Maybe (NonEmpty Text)
templatedPathList) (\s :: AutoDetectionS3SourceConfig
s@AutoDetectionS3SourceConfig' {} Maybe (NonEmpty Text)
a -> AutoDetectionS3SourceConfig
s {$sel:templatedPathList:AutoDetectionS3SourceConfig' :: Maybe (NonEmpty Text)
templatedPathList = Maybe (NonEmpty Text)
a} :: AutoDetectionS3SourceConfig) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Prelude.Hashable AutoDetectionS3SourceConfig where
hashWithSalt :: Int -> AutoDetectionS3SourceConfig -> Int
hashWithSalt Int
_salt AutoDetectionS3SourceConfig' {Maybe (NonEmpty Text)
templatedPathList :: Maybe (NonEmpty Text)
historicalDataPathList :: Maybe (NonEmpty Text)
$sel:templatedPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
$sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
historicalDataPathList
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (NonEmpty Text)
templatedPathList
instance Prelude.NFData AutoDetectionS3SourceConfig where
rnf :: AutoDetectionS3SourceConfig -> ()
rnf AutoDetectionS3SourceConfig' {Maybe (NonEmpty Text)
templatedPathList :: Maybe (NonEmpty Text)
historicalDataPathList :: Maybe (NonEmpty Text)
$sel:templatedPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
$sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
historicalDataPathList
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (NonEmpty Text)
templatedPathList
instance Data.ToJSON AutoDetectionS3SourceConfig where
toJSON :: AutoDetectionS3SourceConfig -> Value
toJSON AutoDetectionS3SourceConfig' {Maybe (NonEmpty Text)
templatedPathList :: Maybe (NonEmpty Text)
historicalDataPathList :: Maybe (NonEmpty Text)
$sel:templatedPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
$sel:historicalDataPathList:AutoDetectionS3SourceConfig' :: AutoDetectionS3SourceConfig -> Maybe (NonEmpty Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"HistoricalDataPathList" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
historicalDataPathList,
(Key
"TemplatedPathList" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty Text)
templatedPathList
]
)