{-# 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.Lightsail.Types.PrivateRegistryAccessRequest where
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lightsail.Types.ContainerServiceECRImagePullerRoleRequest
import qualified Amazonka.Prelude as Prelude
data PrivateRegistryAccessRequest = PrivateRegistryAccessRequest'
{
PrivateRegistryAccessRequest
-> Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole :: Prelude.Maybe ContainerServiceECRImagePullerRoleRequest
}
deriving (PrivateRegistryAccessRequest
-> PrivateRegistryAccessRequest -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PrivateRegistryAccessRequest
-> PrivateRegistryAccessRequest -> Bool
$c/= :: PrivateRegistryAccessRequest
-> PrivateRegistryAccessRequest -> Bool
== :: PrivateRegistryAccessRequest
-> PrivateRegistryAccessRequest -> Bool
$c== :: PrivateRegistryAccessRequest
-> PrivateRegistryAccessRequest -> Bool
Prelude.Eq, ReadPrec [PrivateRegistryAccessRequest]
ReadPrec PrivateRegistryAccessRequest
Int -> ReadS PrivateRegistryAccessRequest
ReadS [PrivateRegistryAccessRequest]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [PrivateRegistryAccessRequest]
$creadListPrec :: ReadPrec [PrivateRegistryAccessRequest]
readPrec :: ReadPrec PrivateRegistryAccessRequest
$creadPrec :: ReadPrec PrivateRegistryAccessRequest
readList :: ReadS [PrivateRegistryAccessRequest]
$creadList :: ReadS [PrivateRegistryAccessRequest]
readsPrec :: Int -> ReadS PrivateRegistryAccessRequest
$creadsPrec :: Int -> ReadS PrivateRegistryAccessRequest
Prelude.Read, Int -> PrivateRegistryAccessRequest -> ShowS
[PrivateRegistryAccessRequest] -> ShowS
PrivateRegistryAccessRequest -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PrivateRegistryAccessRequest] -> ShowS
$cshowList :: [PrivateRegistryAccessRequest] -> ShowS
show :: PrivateRegistryAccessRequest -> String
$cshow :: PrivateRegistryAccessRequest -> String
showsPrec :: Int -> PrivateRegistryAccessRequest -> ShowS
$cshowsPrec :: Int -> PrivateRegistryAccessRequest -> ShowS
Prelude.Show, forall x.
Rep PrivateRegistryAccessRequest x -> PrivateRegistryAccessRequest
forall x.
PrivateRegistryAccessRequest -> Rep PrivateRegistryAccessRequest x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PrivateRegistryAccessRequest x -> PrivateRegistryAccessRequest
$cfrom :: forall x.
PrivateRegistryAccessRequest -> Rep PrivateRegistryAccessRequest x
Prelude.Generic)
newPrivateRegistryAccessRequest ::
PrivateRegistryAccessRequest
newPrivateRegistryAccessRequest :: PrivateRegistryAccessRequest
newPrivateRegistryAccessRequest =
PrivateRegistryAccessRequest'
{ $sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole =
forall a. Maybe a
Prelude.Nothing
}
privateRegistryAccessRequest_ecrImagePullerRole :: Lens.Lens' PrivateRegistryAccessRequest (Prelude.Maybe ContainerServiceECRImagePullerRoleRequest)
privateRegistryAccessRequest_ecrImagePullerRole :: Lens'
PrivateRegistryAccessRequest
(Maybe ContainerServiceECRImagePullerRoleRequest)
privateRegistryAccessRequest_ecrImagePullerRole = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PrivateRegistryAccessRequest' {Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole :: Maybe ContainerServiceECRImagePullerRoleRequest
$sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: PrivateRegistryAccessRequest
-> Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole} -> Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole) (\s :: PrivateRegistryAccessRequest
s@PrivateRegistryAccessRequest' {} Maybe ContainerServiceECRImagePullerRoleRequest
a -> PrivateRegistryAccessRequest
s {$sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole = Maybe ContainerServiceECRImagePullerRoleRequest
a} :: PrivateRegistryAccessRequest)
instance
Prelude.Hashable
PrivateRegistryAccessRequest
where
hashWithSalt :: Int -> PrivateRegistryAccessRequest -> Int
hashWithSalt Int
_salt PrivateRegistryAccessRequest' {Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole :: Maybe ContainerServiceECRImagePullerRoleRequest
$sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: PrivateRegistryAccessRequest
-> Maybe ContainerServiceECRImagePullerRoleRequest
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole
instance Prelude.NFData PrivateRegistryAccessRequest where
rnf :: PrivateRegistryAccessRequest -> ()
rnf PrivateRegistryAccessRequest' {Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole :: Maybe ContainerServiceECRImagePullerRoleRequest
$sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: PrivateRegistryAccessRequest
-> Maybe ContainerServiceECRImagePullerRoleRequest
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole
instance Data.ToJSON PrivateRegistryAccessRequest where
toJSON :: PrivateRegistryAccessRequest -> Value
toJSON PrivateRegistryAccessRequest' {Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole :: Maybe ContainerServiceECRImagePullerRoleRequest
$sel:ecrImagePullerRole:PrivateRegistryAccessRequest' :: PrivateRegistryAccessRequest
-> Maybe ContainerServiceECRImagePullerRoleRequest
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"ecrImagePullerRole" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe ContainerServiceECRImagePullerRoleRequest
ecrImagePullerRole
]
)