{-# 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.Personalize.Types.BatchSegmentJobOutput where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Personalize.Types.S3DataConfig
import qualified Amazonka.Prelude as Prelude
data BatchSegmentJobOutput = BatchSegmentJobOutput'
{ BatchSegmentJobOutput -> S3DataConfig
s3DataDestination :: S3DataConfig
}
deriving (BatchSegmentJobOutput -> BatchSegmentJobOutput -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchSegmentJobOutput -> BatchSegmentJobOutput -> Bool
$c/= :: BatchSegmentJobOutput -> BatchSegmentJobOutput -> Bool
== :: BatchSegmentJobOutput -> BatchSegmentJobOutput -> Bool
$c== :: BatchSegmentJobOutput -> BatchSegmentJobOutput -> Bool
Prelude.Eq, ReadPrec [BatchSegmentJobOutput]
ReadPrec BatchSegmentJobOutput
Int -> ReadS BatchSegmentJobOutput
ReadS [BatchSegmentJobOutput]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchSegmentJobOutput]
$creadListPrec :: ReadPrec [BatchSegmentJobOutput]
readPrec :: ReadPrec BatchSegmentJobOutput
$creadPrec :: ReadPrec BatchSegmentJobOutput
readList :: ReadS [BatchSegmentJobOutput]
$creadList :: ReadS [BatchSegmentJobOutput]
readsPrec :: Int -> ReadS BatchSegmentJobOutput
$creadsPrec :: Int -> ReadS BatchSegmentJobOutput
Prelude.Read, Int -> BatchSegmentJobOutput -> ShowS
[BatchSegmentJobOutput] -> ShowS
BatchSegmentJobOutput -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchSegmentJobOutput] -> ShowS
$cshowList :: [BatchSegmentJobOutput] -> ShowS
show :: BatchSegmentJobOutput -> String
$cshow :: BatchSegmentJobOutput -> String
showsPrec :: Int -> BatchSegmentJobOutput -> ShowS
$cshowsPrec :: Int -> BatchSegmentJobOutput -> ShowS
Prelude.Show, forall x. Rep BatchSegmentJobOutput x -> BatchSegmentJobOutput
forall x. BatchSegmentJobOutput -> Rep BatchSegmentJobOutput x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep BatchSegmentJobOutput x -> BatchSegmentJobOutput
$cfrom :: forall x. BatchSegmentJobOutput -> Rep BatchSegmentJobOutput x
Prelude.Generic)
newBatchSegmentJobOutput ::
S3DataConfig ->
BatchSegmentJobOutput
newBatchSegmentJobOutput :: S3DataConfig -> BatchSegmentJobOutput
newBatchSegmentJobOutput S3DataConfig
pS3DataDestination_ =
BatchSegmentJobOutput'
{ $sel:s3DataDestination:BatchSegmentJobOutput' :: S3DataConfig
s3DataDestination =
S3DataConfig
pS3DataDestination_
}
batchSegmentJobOutput_s3DataDestination :: Lens.Lens' BatchSegmentJobOutput S3DataConfig
batchSegmentJobOutput_s3DataDestination :: Lens' BatchSegmentJobOutput S3DataConfig
batchSegmentJobOutput_s3DataDestination = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchSegmentJobOutput' {S3DataConfig
s3DataDestination :: S3DataConfig
$sel:s3DataDestination:BatchSegmentJobOutput' :: BatchSegmentJobOutput -> S3DataConfig
s3DataDestination} -> S3DataConfig
s3DataDestination) (\s :: BatchSegmentJobOutput
s@BatchSegmentJobOutput' {} S3DataConfig
a -> BatchSegmentJobOutput
s {$sel:s3DataDestination:BatchSegmentJobOutput' :: S3DataConfig
s3DataDestination = S3DataConfig
a} :: BatchSegmentJobOutput)
instance Data.FromJSON BatchSegmentJobOutput where
parseJSON :: Value -> Parser BatchSegmentJobOutput
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"BatchSegmentJobOutput"
( \Object
x ->
S3DataConfig -> BatchSegmentJobOutput
BatchSegmentJobOutput'
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
"s3DataDestination")
)
instance Prelude.Hashable BatchSegmentJobOutput where
hashWithSalt :: Int -> BatchSegmentJobOutput -> Int
hashWithSalt Int
_salt BatchSegmentJobOutput' {S3DataConfig
s3DataDestination :: S3DataConfig
$sel:s3DataDestination:BatchSegmentJobOutput' :: BatchSegmentJobOutput -> S3DataConfig
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` S3DataConfig
s3DataDestination
instance Prelude.NFData BatchSegmentJobOutput where
rnf :: BatchSegmentJobOutput -> ()
rnf BatchSegmentJobOutput' {S3DataConfig
s3DataDestination :: S3DataConfig
$sel:s3DataDestination:BatchSegmentJobOutput' :: BatchSegmentJobOutput -> S3DataConfig
..} =
forall a. NFData a => a -> ()
Prelude.rnf S3DataConfig
s3DataDestination
instance Data.ToJSON BatchSegmentJobOutput where
toJSON :: BatchSegmentJobOutput -> Value
toJSON BatchSegmentJobOutput' {S3DataConfig
s3DataDestination :: S3DataConfig
$sel:s3DataDestination:BatchSegmentJobOutput' :: BatchSegmentJobOutput -> S3DataConfig
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"s3DataDestination" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= S3DataConfig
s3DataDestination)
]
)