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