{-# 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.ECR.Types.ImageReplicationStatus where
import qualified Amazonka.Core as Core
import Amazonka.ECR.Types.ReplicationStatus
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ImageReplicationStatus = ImageReplicationStatus'
{
ImageReplicationStatus -> Maybe ReplicationStatus
status :: Prelude.Maybe ReplicationStatus,
ImageReplicationStatus -> Maybe Text
failureCode :: Prelude.Maybe Prelude.Text,
ImageReplicationStatus -> Maybe Text
registryId :: Prelude.Maybe Prelude.Text,
ImageReplicationStatus -> Maybe Text
region :: Prelude.Maybe Prelude.Text
}
deriving (ImageReplicationStatus -> ImageReplicationStatus -> Bool
(ImageReplicationStatus -> ImageReplicationStatus -> Bool)
-> (ImageReplicationStatus -> ImageReplicationStatus -> Bool)
-> Eq ImageReplicationStatus
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImageReplicationStatus -> ImageReplicationStatus -> Bool
$c/= :: ImageReplicationStatus -> ImageReplicationStatus -> Bool
== :: ImageReplicationStatus -> ImageReplicationStatus -> Bool
$c== :: ImageReplicationStatus -> ImageReplicationStatus -> Bool
Prelude.Eq, ReadPrec [ImageReplicationStatus]
ReadPrec ImageReplicationStatus
Int -> ReadS ImageReplicationStatus
ReadS [ImageReplicationStatus]
(Int -> ReadS ImageReplicationStatus)
-> ReadS [ImageReplicationStatus]
-> ReadPrec ImageReplicationStatus
-> ReadPrec [ImageReplicationStatus]
-> Read ImageReplicationStatus
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImageReplicationStatus]
$creadListPrec :: ReadPrec [ImageReplicationStatus]
readPrec :: ReadPrec ImageReplicationStatus
$creadPrec :: ReadPrec ImageReplicationStatus
readList :: ReadS [ImageReplicationStatus]
$creadList :: ReadS [ImageReplicationStatus]
readsPrec :: Int -> ReadS ImageReplicationStatus
$creadsPrec :: Int -> ReadS ImageReplicationStatus
Prelude.Read, Int -> ImageReplicationStatus -> ShowS
[ImageReplicationStatus] -> ShowS
ImageReplicationStatus -> String
(Int -> ImageReplicationStatus -> ShowS)
-> (ImageReplicationStatus -> String)
-> ([ImageReplicationStatus] -> ShowS)
-> Show ImageReplicationStatus
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImageReplicationStatus] -> ShowS
$cshowList :: [ImageReplicationStatus] -> ShowS
show :: ImageReplicationStatus -> String
$cshow :: ImageReplicationStatus -> String
showsPrec :: Int -> ImageReplicationStatus -> ShowS
$cshowsPrec :: Int -> ImageReplicationStatus -> ShowS
Prelude.Show, (forall x. ImageReplicationStatus -> Rep ImageReplicationStatus x)
-> (forall x.
Rep ImageReplicationStatus x -> ImageReplicationStatus)
-> Generic ImageReplicationStatus
forall x. Rep ImageReplicationStatus x -> ImageReplicationStatus
forall x. ImageReplicationStatus -> Rep ImageReplicationStatus x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImageReplicationStatus x -> ImageReplicationStatus
$cfrom :: forall x. ImageReplicationStatus -> Rep ImageReplicationStatus x
Prelude.Generic)
newImageReplicationStatus ::
ImageReplicationStatus
newImageReplicationStatus :: ImageReplicationStatus
newImageReplicationStatus =
ImageReplicationStatus' :: Maybe ReplicationStatus
-> Maybe Text -> Maybe Text -> Maybe Text -> ImageReplicationStatus
ImageReplicationStatus'
{ $sel:status:ImageReplicationStatus' :: Maybe ReplicationStatus
status = Maybe ReplicationStatus
forall a. Maybe a
Prelude.Nothing,
$sel:failureCode:ImageReplicationStatus' :: Maybe Text
failureCode = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:registryId:ImageReplicationStatus' :: Maybe Text
registryId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:region:ImageReplicationStatus' :: Maybe Text
region = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
imageReplicationStatus_status :: Lens.Lens' ImageReplicationStatus (Prelude.Maybe ReplicationStatus)
imageReplicationStatus_status :: (Maybe ReplicationStatus -> f (Maybe ReplicationStatus))
-> ImageReplicationStatus -> f ImageReplicationStatus
imageReplicationStatus_status = (ImageReplicationStatus -> Maybe ReplicationStatus)
-> (ImageReplicationStatus
-> Maybe ReplicationStatus -> ImageReplicationStatus)
-> Lens
ImageReplicationStatus
ImageReplicationStatus
(Maybe ReplicationStatus)
(Maybe ReplicationStatus)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageReplicationStatus' {Maybe ReplicationStatus
status :: Maybe ReplicationStatus
$sel:status:ImageReplicationStatus' :: ImageReplicationStatus -> Maybe ReplicationStatus
status} -> Maybe ReplicationStatus
status) (\s :: ImageReplicationStatus
s@ImageReplicationStatus' {} Maybe ReplicationStatus
a -> ImageReplicationStatus
s {$sel:status:ImageReplicationStatus' :: Maybe ReplicationStatus
status = Maybe ReplicationStatus
a} :: ImageReplicationStatus)
imageReplicationStatus_failureCode :: Lens.Lens' ImageReplicationStatus (Prelude.Maybe Prelude.Text)
imageReplicationStatus_failureCode :: (Maybe Text -> f (Maybe Text))
-> ImageReplicationStatus -> f ImageReplicationStatus
imageReplicationStatus_failureCode = (ImageReplicationStatus -> Maybe Text)
-> (ImageReplicationStatus -> Maybe Text -> ImageReplicationStatus)
-> Lens
ImageReplicationStatus
ImageReplicationStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageReplicationStatus' {Maybe Text
failureCode :: Maybe Text
$sel:failureCode:ImageReplicationStatus' :: ImageReplicationStatus -> Maybe Text
failureCode} -> Maybe Text
failureCode) (\s :: ImageReplicationStatus
s@ImageReplicationStatus' {} Maybe Text
a -> ImageReplicationStatus
s {$sel:failureCode:ImageReplicationStatus' :: Maybe Text
failureCode = Maybe Text
a} :: ImageReplicationStatus)
imageReplicationStatus_registryId :: Lens.Lens' ImageReplicationStatus (Prelude.Maybe Prelude.Text)
imageReplicationStatus_registryId :: (Maybe Text -> f (Maybe Text))
-> ImageReplicationStatus -> f ImageReplicationStatus
imageReplicationStatus_registryId = (ImageReplicationStatus -> Maybe Text)
-> (ImageReplicationStatus -> Maybe Text -> ImageReplicationStatus)
-> Lens
ImageReplicationStatus
ImageReplicationStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageReplicationStatus' {Maybe Text
registryId :: Maybe Text
$sel:registryId:ImageReplicationStatus' :: ImageReplicationStatus -> Maybe Text
registryId} -> Maybe Text
registryId) (\s :: ImageReplicationStatus
s@ImageReplicationStatus' {} Maybe Text
a -> ImageReplicationStatus
s {$sel:registryId:ImageReplicationStatus' :: Maybe Text
registryId = Maybe Text
a} :: ImageReplicationStatus)
imageReplicationStatus_region :: Lens.Lens' ImageReplicationStatus (Prelude.Maybe Prelude.Text)
imageReplicationStatus_region :: (Maybe Text -> f (Maybe Text))
-> ImageReplicationStatus -> f ImageReplicationStatus
imageReplicationStatus_region = (ImageReplicationStatus -> Maybe Text)
-> (ImageReplicationStatus -> Maybe Text -> ImageReplicationStatus)
-> Lens
ImageReplicationStatus
ImageReplicationStatus
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImageReplicationStatus' {Maybe Text
region :: Maybe Text
$sel:region:ImageReplicationStatus' :: ImageReplicationStatus -> Maybe Text
region} -> Maybe Text
region) (\s :: ImageReplicationStatus
s@ImageReplicationStatus' {} Maybe Text
a -> ImageReplicationStatus
s {$sel:region:ImageReplicationStatus' :: Maybe Text
region = Maybe Text
a} :: ImageReplicationStatus)
instance Core.FromJSON ImageReplicationStatus where
parseJSON :: Value -> Parser ImageReplicationStatus
parseJSON =
String
-> (Object -> Parser ImageReplicationStatus)
-> Value
-> Parser ImageReplicationStatus
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ImageReplicationStatus"
( \Object
x ->
Maybe ReplicationStatus
-> Maybe Text -> Maybe Text -> Maybe Text -> ImageReplicationStatus
ImageReplicationStatus'
(Maybe ReplicationStatus
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ImageReplicationStatus)
-> Parser (Maybe ReplicationStatus)
-> Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ImageReplicationStatus)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe ReplicationStatus)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"status")
Parser
(Maybe Text -> Maybe Text -> Maybe Text -> ImageReplicationStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> Maybe Text -> ImageReplicationStatus)
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
"failureCode")
Parser (Maybe Text -> Maybe Text -> ImageReplicationStatus)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ImageReplicationStatus)
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
"registryId")
Parser (Maybe Text -> ImageReplicationStatus)
-> Parser (Maybe Text) -> Parser ImageReplicationStatus
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
"region")
)
instance Prelude.Hashable ImageReplicationStatus
instance Prelude.NFData ImageReplicationStatus