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