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