{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.Lightsail.CreateContainerServiceRegistryLogin
(
CreateContainerServiceRegistryLogin (..),
newCreateContainerServiceRegistryLogin,
CreateContainerServiceRegistryLoginResponse (..),
newCreateContainerServiceRegistryLoginResponse,
createContainerServiceRegistryLoginResponse_registryLogin,
createContainerServiceRegistryLoginResponse_httpStatus,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import Amazonka.Lightsail.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data CreateContainerServiceRegistryLogin = CreateContainerServiceRegistryLogin'
{
}
deriving (CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool
(CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool)
-> (CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool)
-> Eq CreateContainerServiceRegistryLogin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool
$c/= :: CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool
== :: CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool
$c== :: CreateContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLogin -> Bool
Prelude.Eq, ReadPrec [CreateContainerServiceRegistryLogin]
ReadPrec CreateContainerServiceRegistryLogin
Int -> ReadS CreateContainerServiceRegistryLogin
ReadS [CreateContainerServiceRegistryLogin]
(Int -> ReadS CreateContainerServiceRegistryLogin)
-> ReadS [CreateContainerServiceRegistryLogin]
-> ReadPrec CreateContainerServiceRegistryLogin
-> ReadPrec [CreateContainerServiceRegistryLogin]
-> Read CreateContainerServiceRegistryLogin
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContainerServiceRegistryLogin]
$creadListPrec :: ReadPrec [CreateContainerServiceRegistryLogin]
readPrec :: ReadPrec CreateContainerServiceRegistryLogin
$creadPrec :: ReadPrec CreateContainerServiceRegistryLogin
readList :: ReadS [CreateContainerServiceRegistryLogin]
$creadList :: ReadS [CreateContainerServiceRegistryLogin]
readsPrec :: Int -> ReadS CreateContainerServiceRegistryLogin
$creadsPrec :: Int -> ReadS CreateContainerServiceRegistryLogin
Prelude.Read, Int -> CreateContainerServiceRegistryLogin -> ShowS
[CreateContainerServiceRegistryLogin] -> ShowS
CreateContainerServiceRegistryLogin -> String
(Int -> CreateContainerServiceRegistryLogin -> ShowS)
-> (CreateContainerServiceRegistryLogin -> String)
-> ([CreateContainerServiceRegistryLogin] -> ShowS)
-> Show CreateContainerServiceRegistryLogin
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContainerServiceRegistryLogin] -> ShowS
$cshowList :: [CreateContainerServiceRegistryLogin] -> ShowS
show :: CreateContainerServiceRegistryLogin -> String
$cshow :: CreateContainerServiceRegistryLogin -> String
showsPrec :: Int -> CreateContainerServiceRegistryLogin -> ShowS
$cshowsPrec :: Int -> CreateContainerServiceRegistryLogin -> ShowS
Prelude.Show, (forall x.
CreateContainerServiceRegistryLogin
-> Rep CreateContainerServiceRegistryLogin x)
-> (forall x.
Rep CreateContainerServiceRegistryLogin x
-> CreateContainerServiceRegistryLogin)
-> Generic CreateContainerServiceRegistryLogin
forall x.
Rep CreateContainerServiceRegistryLogin x
-> CreateContainerServiceRegistryLogin
forall x.
CreateContainerServiceRegistryLogin
-> Rep CreateContainerServiceRegistryLogin x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateContainerServiceRegistryLogin x
-> CreateContainerServiceRegistryLogin
$cfrom :: forall x.
CreateContainerServiceRegistryLogin
-> Rep CreateContainerServiceRegistryLogin x
Prelude.Generic)
newCreateContainerServiceRegistryLogin ::
CreateContainerServiceRegistryLogin
newCreateContainerServiceRegistryLogin :: CreateContainerServiceRegistryLogin
newCreateContainerServiceRegistryLogin =
CreateContainerServiceRegistryLogin
CreateContainerServiceRegistryLogin'
instance
Core.AWSRequest
CreateContainerServiceRegistryLogin
where
type
AWSResponse CreateContainerServiceRegistryLogin =
CreateContainerServiceRegistryLoginResponse
request :: CreateContainerServiceRegistryLogin
-> Request CreateContainerServiceRegistryLogin
request = Service
-> CreateContainerServiceRegistryLogin
-> Request CreateContainerServiceRegistryLogin
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy CreateContainerServiceRegistryLogin
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CreateContainerServiceRegistryLogin)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse CreateContainerServiceRegistryLogin))
-> Logger
-> Service
-> Proxy CreateContainerServiceRegistryLogin
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse CreateContainerServiceRegistryLogin)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe ContainerServiceRegistryLogin
-> Int -> CreateContainerServiceRegistryLoginResponse
CreateContainerServiceRegistryLoginResponse'
(Maybe ContainerServiceRegistryLogin
-> Int -> CreateContainerServiceRegistryLoginResponse)
-> Either String (Maybe ContainerServiceRegistryLogin)
-> Either
String (Int -> CreateContainerServiceRegistryLoginResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object
-> Key -> Either String (Maybe ContainerServiceRegistryLogin)
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Core..?> Key
"registryLogin")
Either String (Int -> CreateContainerServiceRegistryLoginResponse)
-> Either String Int
-> Either String CreateContainerServiceRegistryLoginResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance
Prelude.Hashable
CreateContainerServiceRegistryLogin
instance
Prelude.NFData
CreateContainerServiceRegistryLogin
instance
Core.ToHeaders
CreateContainerServiceRegistryLogin
where
toHeaders :: CreateContainerServiceRegistryLogin -> ResponseHeaders
toHeaders =
ResponseHeaders
-> CreateContainerServiceRegistryLogin -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"Lightsail_20161128.CreateContainerServiceRegistryLogin" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance
Core.ToJSON
CreateContainerServiceRegistryLogin
where
toJSON :: CreateContainerServiceRegistryLogin -> Value
toJSON = Value -> CreateContainerServiceRegistryLogin -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance
Core.ToPath
CreateContainerServiceRegistryLogin
where
toPath :: CreateContainerServiceRegistryLogin -> ByteString
toPath = ByteString -> CreateContainerServiceRegistryLogin -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance
Core.ToQuery
CreateContainerServiceRegistryLogin
where
toQuery :: CreateContainerServiceRegistryLogin -> QueryString
toQuery = QueryString -> CreateContainerServiceRegistryLogin -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data CreateContainerServiceRegistryLoginResponse = CreateContainerServiceRegistryLoginResponse'
{
CreateContainerServiceRegistryLoginResponse
-> Maybe ContainerServiceRegistryLogin
registryLogin :: Prelude.Maybe ContainerServiceRegistryLogin,
CreateContainerServiceRegistryLoginResponse -> Int
httpStatus :: Prelude.Int
}
deriving (CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool
(CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool)
-> (CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool)
-> Eq CreateContainerServiceRegistryLoginResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool
$c/= :: CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool
== :: CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool
$c== :: CreateContainerServiceRegistryLoginResponse
-> CreateContainerServiceRegistryLoginResponse -> Bool
Prelude.Eq, ReadPrec [CreateContainerServiceRegistryLoginResponse]
ReadPrec CreateContainerServiceRegistryLoginResponse
Int -> ReadS CreateContainerServiceRegistryLoginResponse
ReadS [CreateContainerServiceRegistryLoginResponse]
(Int -> ReadS CreateContainerServiceRegistryLoginResponse)
-> ReadS [CreateContainerServiceRegistryLoginResponse]
-> ReadPrec CreateContainerServiceRegistryLoginResponse
-> ReadPrec [CreateContainerServiceRegistryLoginResponse]
-> Read CreateContainerServiceRegistryLoginResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateContainerServiceRegistryLoginResponse]
$creadListPrec :: ReadPrec [CreateContainerServiceRegistryLoginResponse]
readPrec :: ReadPrec CreateContainerServiceRegistryLoginResponse
$creadPrec :: ReadPrec CreateContainerServiceRegistryLoginResponse
readList :: ReadS [CreateContainerServiceRegistryLoginResponse]
$creadList :: ReadS [CreateContainerServiceRegistryLoginResponse]
readsPrec :: Int -> ReadS CreateContainerServiceRegistryLoginResponse
$creadsPrec :: Int -> ReadS CreateContainerServiceRegistryLoginResponse
Prelude.Read, Int -> CreateContainerServiceRegistryLoginResponse -> ShowS
[CreateContainerServiceRegistryLoginResponse] -> ShowS
CreateContainerServiceRegistryLoginResponse -> String
(Int -> CreateContainerServiceRegistryLoginResponse -> ShowS)
-> (CreateContainerServiceRegistryLoginResponse -> String)
-> ([CreateContainerServiceRegistryLoginResponse] -> ShowS)
-> Show CreateContainerServiceRegistryLoginResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateContainerServiceRegistryLoginResponse] -> ShowS
$cshowList :: [CreateContainerServiceRegistryLoginResponse] -> ShowS
show :: CreateContainerServiceRegistryLoginResponse -> String
$cshow :: CreateContainerServiceRegistryLoginResponse -> String
showsPrec :: Int -> CreateContainerServiceRegistryLoginResponse -> ShowS
$cshowsPrec :: Int -> CreateContainerServiceRegistryLoginResponse -> ShowS
Prelude.Show, (forall x.
CreateContainerServiceRegistryLoginResponse
-> Rep CreateContainerServiceRegistryLoginResponse x)
-> (forall x.
Rep CreateContainerServiceRegistryLoginResponse x
-> CreateContainerServiceRegistryLoginResponse)
-> Generic CreateContainerServiceRegistryLoginResponse
forall x.
Rep CreateContainerServiceRegistryLoginResponse x
-> CreateContainerServiceRegistryLoginResponse
forall x.
CreateContainerServiceRegistryLoginResponse
-> Rep CreateContainerServiceRegistryLoginResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateContainerServiceRegistryLoginResponse x
-> CreateContainerServiceRegistryLoginResponse
$cfrom :: forall x.
CreateContainerServiceRegistryLoginResponse
-> Rep CreateContainerServiceRegistryLoginResponse x
Prelude.Generic)
newCreateContainerServiceRegistryLoginResponse ::
Prelude.Int ->
CreateContainerServiceRegistryLoginResponse
newCreateContainerServiceRegistryLoginResponse :: Int -> CreateContainerServiceRegistryLoginResponse
newCreateContainerServiceRegistryLoginResponse
Int
pHttpStatus_ =
CreateContainerServiceRegistryLoginResponse' :: Maybe ContainerServiceRegistryLogin
-> Int -> CreateContainerServiceRegistryLoginResponse
CreateContainerServiceRegistryLoginResponse'
{ $sel:registryLogin:CreateContainerServiceRegistryLoginResponse' :: Maybe ContainerServiceRegistryLogin
registryLogin =
Maybe ContainerServiceRegistryLogin
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:CreateContainerServiceRegistryLoginResponse' :: Int
httpStatus = Int
pHttpStatus_
}
createContainerServiceRegistryLoginResponse_registryLogin :: Lens.Lens' CreateContainerServiceRegistryLoginResponse (Prelude.Maybe ContainerServiceRegistryLogin)
createContainerServiceRegistryLoginResponse_registryLogin :: (Maybe ContainerServiceRegistryLogin
-> f (Maybe ContainerServiceRegistryLogin))
-> CreateContainerServiceRegistryLoginResponse
-> f CreateContainerServiceRegistryLoginResponse
createContainerServiceRegistryLoginResponse_registryLogin = (CreateContainerServiceRegistryLoginResponse
-> Maybe ContainerServiceRegistryLogin)
-> (CreateContainerServiceRegistryLoginResponse
-> Maybe ContainerServiceRegistryLogin
-> CreateContainerServiceRegistryLoginResponse)
-> Lens
CreateContainerServiceRegistryLoginResponse
CreateContainerServiceRegistryLoginResponse
(Maybe ContainerServiceRegistryLogin)
(Maybe ContainerServiceRegistryLogin)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerServiceRegistryLoginResponse' {Maybe ContainerServiceRegistryLogin
registryLogin :: Maybe ContainerServiceRegistryLogin
$sel:registryLogin:CreateContainerServiceRegistryLoginResponse' :: CreateContainerServiceRegistryLoginResponse
-> Maybe ContainerServiceRegistryLogin
registryLogin} -> Maybe ContainerServiceRegistryLogin
registryLogin) (\s :: CreateContainerServiceRegistryLoginResponse
s@CreateContainerServiceRegistryLoginResponse' {} Maybe ContainerServiceRegistryLogin
a -> CreateContainerServiceRegistryLoginResponse
s {$sel:registryLogin:CreateContainerServiceRegistryLoginResponse' :: Maybe ContainerServiceRegistryLogin
registryLogin = Maybe ContainerServiceRegistryLogin
a} :: CreateContainerServiceRegistryLoginResponse)
createContainerServiceRegistryLoginResponse_httpStatus :: Lens.Lens' CreateContainerServiceRegistryLoginResponse Prelude.Int
createContainerServiceRegistryLoginResponse_httpStatus :: (Int -> f Int)
-> CreateContainerServiceRegistryLoginResponse
-> f CreateContainerServiceRegistryLoginResponse
createContainerServiceRegistryLoginResponse_httpStatus = (CreateContainerServiceRegistryLoginResponse -> Int)
-> (CreateContainerServiceRegistryLoginResponse
-> Int -> CreateContainerServiceRegistryLoginResponse)
-> Lens
CreateContainerServiceRegistryLoginResponse
CreateContainerServiceRegistryLoginResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateContainerServiceRegistryLoginResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreateContainerServiceRegistryLoginResponse' :: CreateContainerServiceRegistryLoginResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreateContainerServiceRegistryLoginResponse
s@CreateContainerServiceRegistryLoginResponse' {} Int
a -> CreateContainerServiceRegistryLoginResponse
s {$sel:httpStatus:CreateContainerServiceRegistryLoginResponse' :: Int
httpStatus = Int
a} :: CreateContainerServiceRegistryLoginResponse)
instance
Prelude.NFData
CreateContainerServiceRegistryLoginResponse