{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.SageMaker.Types.AthenaDatasetDefinition
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.SageMaker.Types.AthenaDatasetDefinition where

import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.SageMaker.Types.AthenaResultCompressionType
import Amazonka.SageMaker.Types.AthenaResultFormat

-- | Configuration for Athena Dataset Definition input.
--
-- /See:/ 'newAthenaDatasetDefinition' smart constructor.
data AthenaDatasetDefinition = AthenaDatasetDefinition'
  { -- | The Amazon Web Services Key Management Service (Amazon Web Services KMS)
    -- key that Amazon SageMaker uses to encrypt data generated from an Athena
    -- query execution.
    AthenaDatasetDefinition -> Maybe Text
kmsKeyId :: Prelude.Maybe Prelude.Text,
    AthenaDatasetDefinition -> Maybe Text
workGroup :: Prelude.Maybe Prelude.Text,
    AthenaDatasetDefinition -> Maybe AthenaResultCompressionType
outputCompression :: Prelude.Maybe AthenaResultCompressionType,
    AthenaDatasetDefinition -> Text
catalog :: Prelude.Text,
    AthenaDatasetDefinition -> Text
database :: Prelude.Text,
    AthenaDatasetDefinition -> Text
queryString :: Prelude.Text,
    -- | The location in Amazon S3 where Athena query results are stored.
    AthenaDatasetDefinition -> Text
outputS3Uri :: Prelude.Text,
    AthenaDatasetDefinition -> AthenaResultFormat
outputFormat :: AthenaResultFormat
  }
  deriving (AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool
(AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool)
-> (AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool)
-> Eq AthenaDatasetDefinition
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool
$c/= :: AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool
== :: AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool
$c== :: AthenaDatasetDefinition -> AthenaDatasetDefinition -> Bool
Prelude.Eq, ReadPrec [AthenaDatasetDefinition]
ReadPrec AthenaDatasetDefinition
Int -> ReadS AthenaDatasetDefinition
ReadS [AthenaDatasetDefinition]
(Int -> ReadS AthenaDatasetDefinition)
-> ReadS [AthenaDatasetDefinition]
-> ReadPrec AthenaDatasetDefinition
-> ReadPrec [AthenaDatasetDefinition]
-> Read AthenaDatasetDefinition
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AthenaDatasetDefinition]
$creadListPrec :: ReadPrec [AthenaDatasetDefinition]
readPrec :: ReadPrec AthenaDatasetDefinition
$creadPrec :: ReadPrec AthenaDatasetDefinition
readList :: ReadS [AthenaDatasetDefinition]
$creadList :: ReadS [AthenaDatasetDefinition]
readsPrec :: Int -> ReadS AthenaDatasetDefinition
$creadsPrec :: Int -> ReadS AthenaDatasetDefinition
Prelude.Read, Int -> AthenaDatasetDefinition -> ShowS
[AthenaDatasetDefinition] -> ShowS
AthenaDatasetDefinition -> String
(Int -> AthenaDatasetDefinition -> ShowS)
-> (AthenaDatasetDefinition -> String)
-> ([AthenaDatasetDefinition] -> ShowS)
-> Show AthenaDatasetDefinition
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AthenaDatasetDefinition] -> ShowS
$cshowList :: [AthenaDatasetDefinition] -> ShowS
show :: AthenaDatasetDefinition -> String
$cshow :: AthenaDatasetDefinition -> String
showsPrec :: Int -> AthenaDatasetDefinition -> ShowS
$cshowsPrec :: Int -> AthenaDatasetDefinition -> ShowS
Prelude.Show, (forall x.
 AthenaDatasetDefinition -> Rep AthenaDatasetDefinition x)
-> (forall x.
    Rep AthenaDatasetDefinition x -> AthenaDatasetDefinition)
-> Generic AthenaDatasetDefinition
forall x. Rep AthenaDatasetDefinition x -> AthenaDatasetDefinition
forall x. AthenaDatasetDefinition -> Rep AthenaDatasetDefinition x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AthenaDatasetDefinition x -> AthenaDatasetDefinition
$cfrom :: forall x. AthenaDatasetDefinition -> Rep AthenaDatasetDefinition x
Prelude.Generic)

-- |
-- Create a value of 'AthenaDatasetDefinition' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'kmsKeyId', 'athenaDatasetDefinition_kmsKeyId' - The Amazon Web Services Key Management Service (Amazon Web Services KMS)
-- key that Amazon SageMaker uses to encrypt data generated from an Athena
-- query execution.
--
-- 'workGroup', 'athenaDatasetDefinition_workGroup' - Undocumented member.
--
-- 'outputCompression', 'athenaDatasetDefinition_outputCompression' - Undocumented member.
--
-- 'catalog', 'athenaDatasetDefinition_catalog' - Undocumented member.
--
-- 'database', 'athenaDatasetDefinition_database' - Undocumented member.
--
-- 'queryString', 'athenaDatasetDefinition_queryString' - Undocumented member.
--
-- 'outputS3Uri', 'athenaDatasetDefinition_outputS3Uri' - The location in Amazon S3 where Athena query results are stored.
--
-- 'outputFormat', 'athenaDatasetDefinition_outputFormat' - Undocumented member.
newAthenaDatasetDefinition ::
  -- | 'catalog'
  Prelude.Text ->
  -- | 'database'
  Prelude.Text ->
  -- | 'queryString'
  Prelude.Text ->
  -- | 'outputS3Uri'
  Prelude.Text ->
  -- | 'outputFormat'
  AthenaResultFormat ->
  AthenaDatasetDefinition
newAthenaDatasetDefinition :: Text
-> Text
-> Text
-> Text
-> AthenaResultFormat
-> AthenaDatasetDefinition
newAthenaDatasetDefinition
  Text
pCatalog_
  Text
pDatabase_
  Text
pQueryString_
  Text
pOutputS3Uri_
  AthenaResultFormat
pOutputFormat_ =
    AthenaDatasetDefinition' :: Maybe Text
-> Maybe Text
-> Maybe AthenaResultCompressionType
-> Text
-> Text
-> Text
-> Text
-> AthenaResultFormat
-> AthenaDatasetDefinition
AthenaDatasetDefinition'
      { $sel:kmsKeyId:AthenaDatasetDefinition' :: Maybe Text
kmsKeyId =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:workGroup:AthenaDatasetDefinition' :: Maybe Text
workGroup = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:outputCompression:AthenaDatasetDefinition' :: Maybe AthenaResultCompressionType
outputCompression = Maybe AthenaResultCompressionType
forall a. Maybe a
Prelude.Nothing,
        $sel:catalog:AthenaDatasetDefinition' :: Text
catalog = Text
pCatalog_,
        $sel:database:AthenaDatasetDefinition' :: Text
database = Text
pDatabase_,
        $sel:queryString:AthenaDatasetDefinition' :: Text
queryString = Text
pQueryString_,
        $sel:outputS3Uri:AthenaDatasetDefinition' :: Text
outputS3Uri = Text
pOutputS3Uri_,
        $sel:outputFormat:AthenaDatasetDefinition' :: AthenaResultFormat
outputFormat = AthenaResultFormat
pOutputFormat_
      }

-- | The Amazon Web Services Key Management Service (Amazon Web Services KMS)
-- key that Amazon SageMaker uses to encrypt data generated from an Athena
-- query execution.
athenaDatasetDefinition_kmsKeyId :: Lens.Lens' AthenaDatasetDefinition (Prelude.Maybe Prelude.Text)
athenaDatasetDefinition_kmsKeyId :: (Maybe Text -> f (Maybe Text))
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_kmsKeyId = (AthenaDatasetDefinition -> Maybe Text)
-> (AthenaDatasetDefinition
    -> Maybe Text -> AthenaDatasetDefinition)
-> Lens
     AthenaDatasetDefinition
     AthenaDatasetDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Maybe Text
kmsKeyId :: Maybe Text
$sel:kmsKeyId:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe Text
kmsKeyId} -> Maybe Text
kmsKeyId) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Maybe Text
a -> AthenaDatasetDefinition
s {$sel:kmsKeyId:AthenaDatasetDefinition' :: Maybe Text
kmsKeyId = Maybe Text
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_workGroup :: Lens.Lens' AthenaDatasetDefinition (Prelude.Maybe Prelude.Text)
athenaDatasetDefinition_workGroup :: (Maybe Text -> f (Maybe Text))
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_workGroup = (AthenaDatasetDefinition -> Maybe Text)
-> (AthenaDatasetDefinition
    -> Maybe Text -> AthenaDatasetDefinition)
-> Lens
     AthenaDatasetDefinition
     AthenaDatasetDefinition
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Maybe Text
workGroup :: Maybe Text
$sel:workGroup:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe Text
workGroup} -> Maybe Text
workGroup) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Maybe Text
a -> AthenaDatasetDefinition
s {$sel:workGroup:AthenaDatasetDefinition' :: Maybe Text
workGroup = Maybe Text
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_outputCompression :: Lens.Lens' AthenaDatasetDefinition (Prelude.Maybe AthenaResultCompressionType)
athenaDatasetDefinition_outputCompression :: (Maybe AthenaResultCompressionType
 -> f (Maybe AthenaResultCompressionType))
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_outputCompression = (AthenaDatasetDefinition -> Maybe AthenaResultCompressionType)
-> (AthenaDatasetDefinition
    -> Maybe AthenaResultCompressionType -> AthenaDatasetDefinition)
-> Lens
     AthenaDatasetDefinition
     AthenaDatasetDefinition
     (Maybe AthenaResultCompressionType)
     (Maybe AthenaResultCompressionType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Maybe AthenaResultCompressionType
outputCompression :: Maybe AthenaResultCompressionType
$sel:outputCompression:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe AthenaResultCompressionType
outputCompression} -> Maybe AthenaResultCompressionType
outputCompression) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Maybe AthenaResultCompressionType
a -> AthenaDatasetDefinition
s {$sel:outputCompression:AthenaDatasetDefinition' :: Maybe AthenaResultCompressionType
outputCompression = Maybe AthenaResultCompressionType
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_catalog :: Lens.Lens' AthenaDatasetDefinition Prelude.Text
athenaDatasetDefinition_catalog :: (Text -> f Text)
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_catalog = (AthenaDatasetDefinition -> Text)
-> (AthenaDatasetDefinition -> Text -> AthenaDatasetDefinition)
-> Lens AthenaDatasetDefinition AthenaDatasetDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Text
catalog :: Text
$sel:catalog:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
catalog} -> Text
catalog) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Text
a -> AthenaDatasetDefinition
s {$sel:catalog:AthenaDatasetDefinition' :: Text
catalog = Text
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_database :: Lens.Lens' AthenaDatasetDefinition Prelude.Text
athenaDatasetDefinition_database :: (Text -> f Text)
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_database = (AthenaDatasetDefinition -> Text)
-> (AthenaDatasetDefinition -> Text -> AthenaDatasetDefinition)
-> Lens AthenaDatasetDefinition AthenaDatasetDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Text
database :: Text
$sel:database:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
database} -> Text
database) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Text
a -> AthenaDatasetDefinition
s {$sel:database:AthenaDatasetDefinition' :: Text
database = Text
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_queryString :: Lens.Lens' AthenaDatasetDefinition Prelude.Text
athenaDatasetDefinition_queryString :: (Text -> f Text)
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_queryString = (AthenaDatasetDefinition -> Text)
-> (AthenaDatasetDefinition -> Text -> AthenaDatasetDefinition)
-> Lens AthenaDatasetDefinition AthenaDatasetDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Text
queryString :: Text
$sel:queryString:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
queryString} -> Text
queryString) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Text
a -> AthenaDatasetDefinition
s {$sel:queryString:AthenaDatasetDefinition' :: Text
queryString = Text
a} :: AthenaDatasetDefinition)

-- | The location in Amazon S3 where Athena query results are stored.
athenaDatasetDefinition_outputS3Uri :: Lens.Lens' AthenaDatasetDefinition Prelude.Text
athenaDatasetDefinition_outputS3Uri :: (Text -> f Text)
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_outputS3Uri = (AthenaDatasetDefinition -> Text)
-> (AthenaDatasetDefinition -> Text -> AthenaDatasetDefinition)
-> Lens AthenaDatasetDefinition AthenaDatasetDefinition Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {Text
outputS3Uri :: Text
$sel:outputS3Uri:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
outputS3Uri} -> Text
outputS3Uri) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} Text
a -> AthenaDatasetDefinition
s {$sel:outputS3Uri:AthenaDatasetDefinition' :: Text
outputS3Uri = Text
a} :: AthenaDatasetDefinition)

-- | Undocumented member.
athenaDatasetDefinition_outputFormat :: Lens.Lens' AthenaDatasetDefinition AthenaResultFormat
athenaDatasetDefinition_outputFormat :: (AthenaResultFormat -> f AthenaResultFormat)
-> AthenaDatasetDefinition -> f AthenaDatasetDefinition
athenaDatasetDefinition_outputFormat = (AthenaDatasetDefinition -> AthenaResultFormat)
-> (AthenaDatasetDefinition
    -> AthenaResultFormat -> AthenaDatasetDefinition)
-> Lens
     AthenaDatasetDefinition
     AthenaDatasetDefinition
     AthenaResultFormat
     AthenaResultFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AthenaDatasetDefinition' {AthenaResultFormat
outputFormat :: AthenaResultFormat
$sel:outputFormat:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> AthenaResultFormat
outputFormat} -> AthenaResultFormat
outputFormat) (\s :: AthenaDatasetDefinition
s@AthenaDatasetDefinition' {} AthenaResultFormat
a -> AthenaDatasetDefinition
s {$sel:outputFormat:AthenaDatasetDefinition' :: AthenaResultFormat
outputFormat = AthenaResultFormat
a} :: AthenaDatasetDefinition)

instance Core.FromJSON AthenaDatasetDefinition where
  parseJSON :: Value -> Parser AthenaDatasetDefinition
parseJSON =
    String
-> (Object -> Parser AthenaDatasetDefinition)
-> Value
-> Parser AthenaDatasetDefinition
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
      String
"AthenaDatasetDefinition"
      ( \Object
x ->
          Maybe Text
-> Maybe Text
-> Maybe AthenaResultCompressionType
-> Text
-> Text
-> Text
-> Text
-> AthenaResultFormat
-> AthenaDatasetDefinition
AthenaDatasetDefinition'
            (Maybe Text
 -> Maybe Text
 -> Maybe AthenaResultCompressionType
 -> Text
 -> Text
 -> Text
 -> Text
 -> AthenaResultFormat
 -> AthenaDatasetDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe Text
      -> Maybe AthenaResultCompressionType
      -> Text
      -> Text
      -> Text
      -> Text
      -> AthenaResultFormat
      -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"KmsKeyId")
            Parser
  (Maybe Text
   -> Maybe AthenaResultCompressionType
   -> Text
   -> Text
   -> Text
   -> Text
   -> AthenaResultFormat
   -> AthenaDatasetDefinition)
-> Parser (Maybe Text)
-> Parser
     (Maybe AthenaResultCompressionType
      -> Text
      -> Text
      -> Text
      -> Text
      -> AthenaResultFormat
      -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe Text)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"WorkGroup")
            Parser
  (Maybe AthenaResultCompressionType
   -> Text
   -> Text
   -> Text
   -> Text
   -> AthenaResultFormat
   -> AthenaDatasetDefinition)
-> Parser (Maybe AthenaResultCompressionType)
-> Parser
     (Text
      -> Text
      -> Text
      -> Text
      -> AthenaResultFormat
      -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe AthenaResultCompressionType)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"OutputCompression")
            Parser
  (Text
   -> Text
   -> Text
   -> Text
   -> AthenaResultFormat
   -> AthenaDatasetDefinition)
-> Parser Text
-> Parser
     (Text
      -> Text -> Text -> AthenaResultFormat -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Catalog")
            Parser
  (Text
   -> Text -> Text -> AthenaResultFormat -> AthenaDatasetDefinition)
-> Parser Text
-> Parser
     (Text -> Text -> AthenaResultFormat -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"Database")
            Parser
  (Text -> Text -> AthenaResultFormat -> AthenaDatasetDefinition)
-> Parser Text
-> Parser (Text -> AthenaResultFormat -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"QueryString")
            Parser (Text -> AthenaResultFormat -> AthenaDatasetDefinition)
-> Parser Text
-> Parser (AthenaResultFormat -> AthenaDatasetDefinition)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser Text
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputS3Uri")
            Parser (AthenaResultFormat -> AthenaDatasetDefinition)
-> Parser AthenaResultFormat -> Parser AthenaDatasetDefinition
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser AthenaResultFormat
forall a. FromJSON a => Object -> Text -> Parser a
Core..: Text
"OutputFormat")
      )

instance Prelude.Hashable AthenaDatasetDefinition

instance Prelude.NFData AthenaDatasetDefinition

instance Core.ToJSON AthenaDatasetDefinition where
  toJSON :: AthenaDatasetDefinition -> Value
toJSON AthenaDatasetDefinition' {Maybe Text
Maybe AthenaResultCompressionType
Text
AthenaResultFormat
outputFormat :: AthenaResultFormat
outputS3Uri :: Text
queryString :: Text
database :: Text
catalog :: Text
outputCompression :: Maybe AthenaResultCompressionType
workGroup :: Maybe Text
kmsKeyId :: Maybe Text
$sel:outputFormat:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> AthenaResultFormat
$sel:outputS3Uri:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
$sel:queryString:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
$sel:database:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
$sel:catalog:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Text
$sel:outputCompression:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe AthenaResultCompressionType
$sel:workGroup:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe Text
$sel:kmsKeyId:AthenaDatasetDefinition' :: AthenaDatasetDefinition -> Maybe Text
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"KmsKeyId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
kmsKeyId,
            (Text
"WorkGroup" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
workGroup,
            (Text
"OutputCompression" Text -> AthenaResultCompressionType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
              (AthenaResultCompressionType -> Pair)
-> Maybe AthenaResultCompressionType -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe AthenaResultCompressionType
outputCompression,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Catalog" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
catalog),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Database" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
database),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"QueryString" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
queryString),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputS3Uri" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
outputS3Uri),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"OutputFormat" Text -> AthenaResultFormat -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AthenaResultFormat
outputFormat)
          ]
      )