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