{-# 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.Glue.Types.BatchUpdatePartitionFailureEntry where
import qualified Amazonka.Core as Core
import Amazonka.Glue.Types.ErrorDetail
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data BatchUpdatePartitionFailureEntry = BatchUpdatePartitionFailureEntry'
{
BatchUpdatePartitionFailureEntry -> Maybe [Text]
partitionValueList :: Prelude.Maybe [Prelude.Text],
BatchUpdatePartitionFailureEntry -> Maybe ErrorDetail
errorDetail :: Prelude.Maybe ErrorDetail
}
deriving (BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool
(BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool)
-> (BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool)
-> Eq BatchUpdatePartitionFailureEntry
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool
$c/= :: BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool
== :: BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool
$c== :: BatchUpdatePartitionFailureEntry
-> BatchUpdatePartitionFailureEntry -> Bool
Prelude.Eq, ReadPrec [BatchUpdatePartitionFailureEntry]
ReadPrec BatchUpdatePartitionFailureEntry
Int -> ReadS BatchUpdatePartitionFailureEntry
ReadS [BatchUpdatePartitionFailureEntry]
(Int -> ReadS BatchUpdatePartitionFailureEntry)
-> ReadS [BatchUpdatePartitionFailureEntry]
-> ReadPrec BatchUpdatePartitionFailureEntry
-> ReadPrec [BatchUpdatePartitionFailureEntry]
-> Read BatchUpdatePartitionFailureEntry
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [BatchUpdatePartitionFailureEntry]
$creadListPrec :: ReadPrec [BatchUpdatePartitionFailureEntry]
readPrec :: ReadPrec BatchUpdatePartitionFailureEntry
$creadPrec :: ReadPrec BatchUpdatePartitionFailureEntry
readList :: ReadS [BatchUpdatePartitionFailureEntry]
$creadList :: ReadS [BatchUpdatePartitionFailureEntry]
readsPrec :: Int -> ReadS BatchUpdatePartitionFailureEntry
$creadsPrec :: Int -> ReadS BatchUpdatePartitionFailureEntry
Prelude.Read, Int -> BatchUpdatePartitionFailureEntry -> ShowS
[BatchUpdatePartitionFailureEntry] -> ShowS
BatchUpdatePartitionFailureEntry -> String
(Int -> BatchUpdatePartitionFailureEntry -> ShowS)
-> (BatchUpdatePartitionFailureEntry -> String)
-> ([BatchUpdatePartitionFailureEntry] -> ShowS)
-> Show BatchUpdatePartitionFailureEntry
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [BatchUpdatePartitionFailureEntry] -> ShowS
$cshowList :: [BatchUpdatePartitionFailureEntry] -> ShowS
show :: BatchUpdatePartitionFailureEntry -> String
$cshow :: BatchUpdatePartitionFailureEntry -> String
showsPrec :: Int -> BatchUpdatePartitionFailureEntry -> ShowS
$cshowsPrec :: Int -> BatchUpdatePartitionFailureEntry -> ShowS
Prelude.Show, (forall x.
BatchUpdatePartitionFailureEntry
-> Rep BatchUpdatePartitionFailureEntry x)
-> (forall x.
Rep BatchUpdatePartitionFailureEntry x
-> BatchUpdatePartitionFailureEntry)
-> Generic BatchUpdatePartitionFailureEntry
forall x.
Rep BatchUpdatePartitionFailureEntry x
-> BatchUpdatePartitionFailureEntry
forall x.
BatchUpdatePartitionFailureEntry
-> Rep BatchUpdatePartitionFailureEntry x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep BatchUpdatePartitionFailureEntry x
-> BatchUpdatePartitionFailureEntry
$cfrom :: forall x.
BatchUpdatePartitionFailureEntry
-> Rep BatchUpdatePartitionFailureEntry x
Prelude.Generic)
newBatchUpdatePartitionFailureEntry ::
BatchUpdatePartitionFailureEntry
newBatchUpdatePartitionFailureEntry :: BatchUpdatePartitionFailureEntry
newBatchUpdatePartitionFailureEntry =
BatchUpdatePartitionFailureEntry' :: Maybe [Text]
-> Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry
BatchUpdatePartitionFailureEntry'
{ $sel:partitionValueList:BatchUpdatePartitionFailureEntry' :: Maybe [Text]
partitionValueList =
Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:errorDetail:BatchUpdatePartitionFailureEntry' :: Maybe ErrorDetail
errorDetail = Maybe ErrorDetail
forall a. Maybe a
Prelude.Nothing
}
batchUpdatePartitionFailureEntry_partitionValueList :: Lens.Lens' BatchUpdatePartitionFailureEntry (Prelude.Maybe [Prelude.Text])
batchUpdatePartitionFailureEntry_partitionValueList :: (Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdatePartitionFailureEntry
-> f BatchUpdatePartitionFailureEntry
batchUpdatePartitionFailureEntry_partitionValueList = (BatchUpdatePartitionFailureEntry -> Maybe [Text])
-> (BatchUpdatePartitionFailureEntry
-> Maybe [Text] -> BatchUpdatePartitionFailureEntry)
-> Lens
BatchUpdatePartitionFailureEntry
BatchUpdatePartitionFailureEntry
(Maybe [Text])
(Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdatePartitionFailureEntry' {Maybe [Text]
partitionValueList :: Maybe [Text]
$sel:partitionValueList:BatchUpdatePartitionFailureEntry' :: BatchUpdatePartitionFailureEntry -> Maybe [Text]
partitionValueList} -> Maybe [Text]
partitionValueList) (\s :: BatchUpdatePartitionFailureEntry
s@BatchUpdatePartitionFailureEntry' {} Maybe [Text]
a -> BatchUpdatePartitionFailureEntry
s {$sel:partitionValueList:BatchUpdatePartitionFailureEntry' :: Maybe [Text]
partitionValueList = Maybe [Text]
a} :: BatchUpdatePartitionFailureEntry) ((Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdatePartitionFailureEntry
-> f BatchUpdatePartitionFailureEntry)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> BatchUpdatePartitionFailureEntry
-> f BatchUpdatePartitionFailureEntry
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
batchUpdatePartitionFailureEntry_errorDetail :: Lens.Lens' BatchUpdatePartitionFailureEntry (Prelude.Maybe ErrorDetail)
batchUpdatePartitionFailureEntry_errorDetail :: (Maybe ErrorDetail -> f (Maybe ErrorDetail))
-> BatchUpdatePartitionFailureEntry
-> f BatchUpdatePartitionFailureEntry
batchUpdatePartitionFailureEntry_errorDetail = (BatchUpdatePartitionFailureEntry -> Maybe ErrorDetail)
-> (BatchUpdatePartitionFailureEntry
-> Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry)
-> Lens
BatchUpdatePartitionFailureEntry
BatchUpdatePartitionFailureEntry
(Maybe ErrorDetail)
(Maybe ErrorDetail)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\BatchUpdatePartitionFailureEntry' {Maybe ErrorDetail
errorDetail :: Maybe ErrorDetail
$sel:errorDetail:BatchUpdatePartitionFailureEntry' :: BatchUpdatePartitionFailureEntry -> Maybe ErrorDetail
errorDetail} -> Maybe ErrorDetail
errorDetail) (\s :: BatchUpdatePartitionFailureEntry
s@BatchUpdatePartitionFailureEntry' {} Maybe ErrorDetail
a -> BatchUpdatePartitionFailureEntry
s {$sel:errorDetail:BatchUpdatePartitionFailureEntry' :: Maybe ErrorDetail
errorDetail = Maybe ErrorDetail
a} :: BatchUpdatePartitionFailureEntry)
instance
Core.FromJSON
BatchUpdatePartitionFailureEntry
where
parseJSON :: Value -> Parser BatchUpdatePartitionFailureEntry
parseJSON =
String
-> (Object -> Parser BatchUpdatePartitionFailureEntry)
-> Value
-> Parser BatchUpdatePartitionFailureEntry
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"BatchUpdatePartitionFailureEntry"
( \Object
x ->
Maybe [Text]
-> Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry
BatchUpdatePartitionFailureEntry'
(Maybe [Text]
-> Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry)
-> Parser (Maybe [Text])
-> Parser (Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x Object -> Text -> Parser (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"PartitionValueList"
Parser (Maybe (Maybe [Text]))
-> Maybe [Text] -> Parser (Maybe [Text])
forall a. Parser (Maybe a) -> a -> Parser a
Core..!= Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Parser (Maybe ErrorDetail -> BatchUpdatePartitionFailureEntry)
-> Parser (Maybe ErrorDetail)
-> Parser BatchUpdatePartitionFailureEntry
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Parser (Maybe ErrorDetail)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"ErrorDetail")
)
instance
Prelude.Hashable
BatchUpdatePartitionFailureEntry
instance
Prelude.NFData
BatchUpdatePartitionFailureEntry