{-# 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.ContainerServiceRegistryLogin where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data ContainerServiceRegistryLogin = ContainerServiceRegistryLogin'
{
ContainerServiceRegistryLogin -> Maybe POSIX
expiresAt :: Prelude.Maybe Core.POSIX,
ContainerServiceRegistryLogin -> Maybe Text
username :: Prelude.Maybe Prelude.Text,
ContainerServiceRegistryLogin -> Maybe Text
password :: Prelude.Maybe Prelude.Text,
ContainerServiceRegistryLogin -> Maybe Text
registry :: Prelude.Maybe Prelude.Text
}
deriving (ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool
(ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool)
-> (ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool)
-> Eq ContainerServiceRegistryLogin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool
$c/= :: ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool
== :: ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool
$c== :: ContainerServiceRegistryLogin
-> ContainerServiceRegistryLogin -> Bool
Prelude.Eq, ReadPrec [ContainerServiceRegistryLogin]
ReadPrec ContainerServiceRegistryLogin
Int -> ReadS ContainerServiceRegistryLogin
ReadS [ContainerServiceRegistryLogin]
(Int -> ReadS ContainerServiceRegistryLogin)
-> ReadS [ContainerServiceRegistryLogin]
-> ReadPrec ContainerServiceRegistryLogin
-> ReadPrec [ContainerServiceRegistryLogin]
-> Read ContainerServiceRegistryLogin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ContainerServiceRegistryLogin]
$creadListPrec :: ReadPrec [ContainerServiceRegistryLogin]
readPrec :: ReadPrec ContainerServiceRegistryLogin
$creadPrec :: ReadPrec ContainerServiceRegistryLogin
readList :: ReadS [ContainerServiceRegistryLogin]
$creadList :: ReadS [ContainerServiceRegistryLogin]
readsPrec :: Int -> ReadS ContainerServiceRegistryLogin
$creadsPrec :: Int -> ReadS ContainerServiceRegistryLogin
Prelude.Read, Int -> ContainerServiceRegistryLogin -> ShowS
[ContainerServiceRegistryLogin] -> ShowS
ContainerServiceRegistryLogin -> String
(Int -> ContainerServiceRegistryLogin -> ShowS)
-> (ContainerServiceRegistryLogin -> String)
-> ([ContainerServiceRegistryLogin] -> ShowS)
-> Show ContainerServiceRegistryLogin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ContainerServiceRegistryLogin] -> ShowS
$cshowList :: [ContainerServiceRegistryLogin] -> ShowS
show :: ContainerServiceRegistryLogin -> String
$cshow :: ContainerServiceRegistryLogin -> String
showsPrec :: Int -> ContainerServiceRegistryLogin -> ShowS
$cshowsPrec :: Int -> ContainerServiceRegistryLogin -> ShowS
Prelude.Show, (forall x.
ContainerServiceRegistryLogin
-> Rep ContainerServiceRegistryLogin x)
-> (forall x.
Rep ContainerServiceRegistryLogin x
-> ContainerServiceRegistryLogin)
-> Generic ContainerServiceRegistryLogin
forall x.
Rep ContainerServiceRegistryLogin x
-> ContainerServiceRegistryLogin
forall x.
ContainerServiceRegistryLogin
-> Rep ContainerServiceRegistryLogin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ContainerServiceRegistryLogin x
-> ContainerServiceRegistryLogin
$cfrom :: forall x.
ContainerServiceRegistryLogin
-> Rep ContainerServiceRegistryLogin x
Prelude.Generic)
newContainerServiceRegistryLogin ::
ContainerServiceRegistryLogin
newContainerServiceRegistryLogin :: ContainerServiceRegistryLogin
newContainerServiceRegistryLogin =
ContainerServiceRegistryLogin' :: Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ContainerServiceRegistryLogin
ContainerServiceRegistryLogin'
{ $sel:expiresAt:ContainerServiceRegistryLogin' :: Maybe POSIX
expiresAt =
Maybe POSIX
forall a. Maybe a
Prelude.Nothing,
$sel:username:ContainerServiceRegistryLogin' :: Maybe Text
username = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:password:ContainerServiceRegistryLogin' :: Maybe Text
password = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:registry:ContainerServiceRegistryLogin' :: Maybe Text
registry = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
containerServiceRegistryLogin_expiresAt :: Lens.Lens' ContainerServiceRegistryLogin (Prelude.Maybe Prelude.UTCTime)
containerServiceRegistryLogin_expiresAt :: (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerServiceRegistryLogin -> f ContainerServiceRegistryLogin
containerServiceRegistryLogin_expiresAt = (ContainerServiceRegistryLogin -> Maybe POSIX)
-> (ContainerServiceRegistryLogin
-> Maybe POSIX -> ContainerServiceRegistryLogin)
-> Lens
ContainerServiceRegistryLogin
ContainerServiceRegistryLogin
(Maybe POSIX)
(Maybe POSIX)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceRegistryLogin' {Maybe POSIX
expiresAt :: Maybe POSIX
$sel:expiresAt:ContainerServiceRegistryLogin' :: ContainerServiceRegistryLogin -> Maybe POSIX
expiresAt} -> Maybe POSIX
expiresAt) (\s :: ContainerServiceRegistryLogin
s@ContainerServiceRegistryLogin' {} Maybe POSIX
a -> ContainerServiceRegistryLogin
s {$sel:expiresAt:ContainerServiceRegistryLogin' :: Maybe POSIX
expiresAt = Maybe POSIX
a} :: ContainerServiceRegistryLogin) ((Maybe POSIX -> f (Maybe POSIX))
-> ContainerServiceRegistryLogin
-> f ContainerServiceRegistryLogin)
-> ((Maybe UTCTime -> f (Maybe UTCTime))
-> Maybe POSIX -> f (Maybe POSIX))
-> (Maybe UTCTime -> f (Maybe UTCTime))
-> ContainerServiceRegistryLogin
-> f ContainerServiceRegistryLogin
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso POSIX POSIX UTCTime UTCTime
-> Iso (Maybe POSIX) (Maybe POSIX) (Maybe UTCTime) (Maybe UTCTime)
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 POSIX POSIX UTCTime UTCTime
forall (a :: Format). Iso' (Time a) UTCTime
Core._Time
containerServiceRegistryLogin_username :: Lens.Lens' ContainerServiceRegistryLogin (Prelude.Maybe Prelude.Text)
containerServiceRegistryLogin_username :: (Maybe Text -> f (Maybe Text))
-> ContainerServiceRegistryLogin -> f ContainerServiceRegistryLogin
containerServiceRegistryLogin_username = (ContainerServiceRegistryLogin -> Maybe Text)
-> (ContainerServiceRegistryLogin
-> Maybe Text -> ContainerServiceRegistryLogin)
-> Lens
ContainerServiceRegistryLogin
ContainerServiceRegistryLogin
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceRegistryLogin' {Maybe Text
username :: Maybe Text
$sel:username:ContainerServiceRegistryLogin' :: ContainerServiceRegistryLogin -> Maybe Text
username} -> Maybe Text
username) (\s :: ContainerServiceRegistryLogin
s@ContainerServiceRegistryLogin' {} Maybe Text
a -> ContainerServiceRegistryLogin
s {$sel:username:ContainerServiceRegistryLogin' :: Maybe Text
username = Maybe Text
a} :: ContainerServiceRegistryLogin)
containerServiceRegistryLogin_password :: Lens.Lens' ContainerServiceRegistryLogin (Prelude.Maybe Prelude.Text)
containerServiceRegistryLogin_password :: (Maybe Text -> f (Maybe Text))
-> ContainerServiceRegistryLogin -> f ContainerServiceRegistryLogin
containerServiceRegistryLogin_password = (ContainerServiceRegistryLogin -> Maybe Text)
-> (ContainerServiceRegistryLogin
-> Maybe Text -> ContainerServiceRegistryLogin)
-> Lens
ContainerServiceRegistryLogin
ContainerServiceRegistryLogin
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceRegistryLogin' {Maybe Text
password :: Maybe Text
$sel:password:ContainerServiceRegistryLogin' :: ContainerServiceRegistryLogin -> Maybe Text
password} -> Maybe Text
password) (\s :: ContainerServiceRegistryLogin
s@ContainerServiceRegistryLogin' {} Maybe Text
a -> ContainerServiceRegistryLogin
s {$sel:password:ContainerServiceRegistryLogin' :: Maybe Text
password = Maybe Text
a} :: ContainerServiceRegistryLogin)
containerServiceRegistryLogin_registry :: Lens.Lens' ContainerServiceRegistryLogin (Prelude.Maybe Prelude.Text)
containerServiceRegistryLogin_registry :: (Maybe Text -> f (Maybe Text))
-> ContainerServiceRegistryLogin -> f ContainerServiceRegistryLogin
containerServiceRegistryLogin_registry = (ContainerServiceRegistryLogin -> Maybe Text)
-> (ContainerServiceRegistryLogin
-> Maybe Text -> ContainerServiceRegistryLogin)
-> Lens
ContainerServiceRegistryLogin
ContainerServiceRegistryLogin
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ContainerServiceRegistryLogin' {Maybe Text
registry :: Maybe Text
$sel:registry:ContainerServiceRegistryLogin' :: ContainerServiceRegistryLogin -> Maybe Text
registry} -> Maybe Text
registry) (\s :: ContainerServiceRegistryLogin
s@ContainerServiceRegistryLogin' {} Maybe Text
a -> ContainerServiceRegistryLogin
s {$sel:registry:ContainerServiceRegistryLogin' :: Maybe Text
registry = Maybe Text
a} :: ContainerServiceRegistryLogin)
instance Core.FromJSON ContainerServiceRegistryLogin where
parseJSON :: Value -> Parser ContainerServiceRegistryLogin
parseJSON =
String
-> (Object -> Parser ContainerServiceRegistryLogin)
-> Value
-> Parser ContainerServiceRegistryLogin
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Core.withObject
String
"ContainerServiceRegistryLogin"
( \Object
x ->
Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ContainerServiceRegistryLogin
ContainerServiceRegistryLogin'
(Maybe POSIX
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> ContainerServiceRegistryLogin)
-> Parser (Maybe POSIX)
-> Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> ContainerServiceRegistryLogin)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Parser (Maybe POSIX)
forall a. FromJSON a => Object -> Text -> Parser (Maybe a)
Core..:? Text
"expiresAt")
Parser
(Maybe Text
-> Maybe Text -> Maybe Text -> ContainerServiceRegistryLogin)
-> Parser (Maybe Text)
-> Parser
(Maybe Text -> Maybe Text -> ContainerServiceRegistryLogin)
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
"username")
Parser (Maybe Text -> Maybe Text -> ContainerServiceRegistryLogin)
-> Parser (Maybe Text)
-> Parser (Maybe Text -> ContainerServiceRegistryLogin)
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
"password")
Parser (Maybe Text -> ContainerServiceRegistryLogin)
-> Parser (Maybe Text) -> Parser ContainerServiceRegistryLogin
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
"registry")
)
instance
Prelude.Hashable
ContainerServiceRegistryLogin
instance Prelude.NFData ContainerServiceRegistryLogin