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