{-# 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.Athena.Types.UnprocessedQueryExecutionId where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data UnprocessedQueryExecutionId = UnprocessedQueryExecutionId'
{
UnprocessedQueryExecutionId -> Maybe Text
errorCode :: Prelude.Maybe Prelude.Text,
UnprocessedQueryExecutionId -> Maybe Text
queryExecutionId :: Prelude.Maybe Prelude.Text,
UnprocessedQueryExecutionId -> Maybe Text
errorMessage :: Prelude.Maybe Prelude.Text
}
deriving (UnprocessedQueryExecutionId -> UnprocessedQueryExecutionId -> Bool
(UnprocessedQueryExecutionId
-> UnprocessedQueryExecutionId -> Bool)
-> (UnprocessedQueryExecutionId
-> UnprocessedQueryExecutionId -> Bool)
-> Eq UnprocessedQueryExecutionId
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UnprocessedQueryExecutionId -> UnprocessedQueryExecutionId -> Bool
$c/= :: UnprocessedQueryExecutionId -> UnprocessedQueryExecutionId -> Bool
== :: UnprocessedQueryExecutionId -> UnprocessedQueryExecutionId -> Bool
$c== :: UnprocessedQueryExecutionId -> UnprocessedQueryExecutionId -> Bool
Prelude.Eq, ReadPrec [UnprocessedQueryExecutionId]
ReadPrec UnprocessedQueryExecutionId
Int -> ReadS UnprocessedQueryExecutionId
ReadS [UnprocessedQueryExecutionId]
(Int -> ReadS UnprocessedQueryExecutionId)
-> ReadS [UnprocessedQueryExecutionId]
-> ReadPrec UnprocessedQueryExecutionId
-> ReadPrec [UnprocessedQueryExecutionId]
-> Read UnprocessedQueryExecutionId
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UnprocessedQueryExecutionId]
$creadListPrec :: ReadPrec [UnprocessedQueryExecutionId]
readPrec :: ReadPrec UnprocessedQueryExecutionId
$creadPrec :: ReadPrec UnprocessedQueryExecutionId
readList :: ReadS [UnprocessedQueryExecutionId]
$creadList :: ReadS [UnprocessedQueryExecutionId]
readsPrec :: Int -> ReadS UnprocessedQueryExecutionId
$creadsPrec :: Int -> ReadS UnprocessedQueryExecutionId
Prelude.Read, Int -> UnprocessedQueryExecutionId -> ShowS
[UnprocessedQueryExecutionId] -> ShowS
UnprocessedQueryExecutionId -> String
(Int -> UnprocessedQueryExecutionId -> ShowS)
-> (UnprocessedQueryExecutionId -> String)
-> ([UnprocessedQueryExecutionId] -> ShowS)
-> Show UnprocessedQueryExecutionId
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UnprocessedQueryExecutionId] -> ShowS
$cshowList :: [UnprocessedQueryExecutionId] -> ShowS
show :: UnprocessedQueryExecutionId -> String
$cshow :: UnprocessedQueryExecutionId -> String
showsPrec :: Int -> UnprocessedQueryExecutionId -> ShowS
$cshowsPrec :: Int -> UnprocessedQueryExecutionId -> ShowS
Prelude.Show, (forall x.
UnprocessedQueryExecutionId -> Rep UnprocessedQueryExecutionId x)
-> (forall x.
Rep UnprocessedQueryExecutionId x -> UnprocessedQueryExecutionId)
-> Generic UnprocessedQueryExecutionId
forall x.
Rep UnprocessedQueryExecutionId x -> UnprocessedQueryExecutionId
forall x.
UnprocessedQueryExecutionId -> Rep UnprocessedQueryExecutionId x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UnprocessedQueryExecutionId x -> UnprocessedQueryExecutionId
$cfrom :: forall x.
UnprocessedQueryExecutionId -> Rep UnprocessedQueryExecutionId x
Prelude.Generic)
newUnprocessedQueryExecutionId ::
UnprocessedQueryExecutionId
newUnprocessedQueryExecutionId :: UnprocessedQueryExecutionId
newUnprocessedQueryExecutionId =
UnprocessedQueryExecutionId' :: Maybe Text
-> Maybe Text -> Maybe Text -> UnprocessedQueryExecutionId
UnprocessedQueryExecutionId'
{ $sel:errorCode:UnprocessedQueryExecutionId' :: Maybe Text
errorCode =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:queryExecutionId:UnprocessedQueryExecutionId' :: Maybe Text
queryExecutionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:errorMessage:UnprocessedQueryExecutionId' :: Maybe Text
errorMessage = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
unprocessedQueryExecutionId_errorCode :: Lens.Lens' UnprocessedQueryExecutionId (Prelude.Maybe Prelude.Text)
unprocessedQueryExecutionId_errorCode :: (Maybe Text -> f (Maybe Text))
-> UnprocessedQueryExecutionId -> f UnprocessedQueryExecutionId
unprocessedQueryExecutionId_errorCode = (UnprocessedQueryExecutionId -> Maybe Text)
-> (UnprocessedQueryExecutionId
-> Maybe Text -> UnprocessedQueryExecutionId)
-> Lens
UnprocessedQueryExecutionId
UnprocessedQueryExecutionId
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedQueryExecutionId' {Maybe Text
errorCode :: Maybe Text
$sel:errorCode:UnprocessedQueryExecutionId' :: UnprocessedQueryExecutionId -> Maybe Text
errorCode} -> Maybe Text
errorCode) (\s :: UnprocessedQueryExecutionId
s@UnprocessedQueryExecutionId' {} Maybe Text
a -> UnprocessedQueryExecutionId
s {$sel:errorCode:UnprocessedQueryExecutionId' :: Maybe Text
errorCode = Maybe Text
a} :: UnprocessedQueryExecutionId)
unprocessedQueryExecutionId_queryExecutionId :: Lens.Lens' UnprocessedQueryExecutionId (Prelude.Maybe Prelude.Text)
unprocessedQueryExecutionId_queryExecutionId :: (Maybe Text -> f (Maybe Text))
-> UnprocessedQueryExecutionId -> f UnprocessedQueryExecutionId
unprocessedQueryExecutionId_queryExecutionId = (UnprocessedQueryExecutionId -> Maybe Text)
-> (UnprocessedQueryExecutionId
-> Maybe Text -> UnprocessedQueryExecutionId)
-> Lens
UnprocessedQueryExecutionId
UnprocessedQueryExecutionId
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedQueryExecutionId' {Maybe Text
queryExecutionId :: Maybe Text
$sel:queryExecutionId:UnprocessedQueryExecutionId' :: UnprocessedQueryExecutionId -> Maybe Text
queryExecutionId} -> Maybe Text
queryExecutionId) (\s :: UnprocessedQueryExecutionId
s@UnprocessedQueryExecutionId' {} Maybe Text
a -> UnprocessedQueryExecutionId
s {$sel:queryExecutionId:UnprocessedQueryExecutionId' :: Maybe Text
queryExecutionId = Maybe Text
a} :: UnprocessedQueryExecutionId)
unprocessedQueryExecutionId_errorMessage :: Lens.Lens' UnprocessedQueryExecutionId (Prelude.Maybe Prelude.Text)
unprocessedQueryExecutionId_errorMessage :: (Maybe Text -> f (Maybe Text))
-> UnprocessedQueryExecutionId -> f UnprocessedQueryExecutionId
unprocessedQueryExecutionId_errorMessage = (UnprocessedQueryExecutionId -> Maybe Text)
-> (UnprocessedQueryExecutionId
-> Maybe Text -> UnprocessedQueryExecutionId)
-> Lens
UnprocessedQueryExecutionId
UnprocessedQueryExecutionId
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UnprocessedQueryExecutionId' {Maybe Text
errorMessage :: Maybe Text
$sel:errorMessage:UnprocessedQueryExecutionId' :: UnprocessedQueryExecutionId -> Maybe Text
errorMessage} -> Maybe Text
errorMessage) (\s :: UnprocessedQueryExecutionId
s@UnprocessedQueryExecutionId' {} Maybe Text
a -> UnprocessedQueryExecutionId
s {$sel:errorMessage:UnprocessedQueryExecutionId' :: Maybe Text
errorMessage = Maybe Text
a} :: UnprocessedQueryExecutionId)
instance Core.FromJSON UnprocessedQueryExecutionId where
parseJSON :: Value -> Parser UnprocessedQueryExecutionId
parseJSON =
String
-> (Object -> Parser UnprocessedQueryExecutionId)
-> Value
-> Parser UnprocessedQueryExecutionId
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"UnprocessedQueryExecutionId"
( \Object
x ->
Maybe Text
-> Maybe Text -> Maybe Text -> UnprocessedQueryExecutionId
UnprocessedQueryExecutionId'
(Maybe Text
-> Maybe Text -> Maybe Text -> UnprocessedQueryExecutionId)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> UnprocessedQueryExecutionId)
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
"ErrorCode")
Parser (Maybe Text -> Maybe Text -> UnprocessedQueryExecutionId)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> UnprocessedQueryExecutionId)
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
"QueryExecutionId")
Parser (Maybe Text -> UnprocessedQueryExecutionId)
-> Parser (Maybe Text) -> Parser UnprocessedQueryExecutionId
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
"ErrorMessage")
)
instance Prelude.Hashable UnprocessedQueryExecutionId
instance Prelude.NFData UnprocessedQueryExecutionId