{-# 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.CloudFormation.DeregisterType
(
DeregisterType (..),
newDeregisterType,
deregisterType_versionId,
deregisterType_typeName,
deregisterType_arn,
deregisterType_type,
DeregisterTypeResponse (..),
newDeregisterTypeResponse,
deregisterTypeResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeregisterType = DeregisterType'
{
DeregisterType -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text,
DeregisterType -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
DeregisterType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DeregisterType -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType
}
deriving (DeregisterType -> DeregisterType -> Bool
(DeregisterType -> DeregisterType -> Bool)
-> (DeregisterType -> DeregisterType -> Bool) -> Eq DeregisterType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterType -> DeregisterType -> Bool
$c/= :: DeregisterType -> DeregisterType -> Bool
== :: DeregisterType -> DeregisterType -> Bool
$c== :: DeregisterType -> DeregisterType -> Bool
Prelude.Eq, ReadPrec [DeregisterType]
ReadPrec DeregisterType
Int -> ReadS DeregisterType
ReadS [DeregisterType]
(Int -> ReadS DeregisterType)
-> ReadS [DeregisterType]
-> ReadPrec DeregisterType
-> ReadPrec [DeregisterType]
-> Read DeregisterType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterType]
$creadListPrec :: ReadPrec [DeregisterType]
readPrec :: ReadPrec DeregisterType
$creadPrec :: ReadPrec DeregisterType
readList :: ReadS [DeregisterType]
$creadList :: ReadS [DeregisterType]
readsPrec :: Int -> ReadS DeregisterType
$creadsPrec :: Int -> ReadS DeregisterType
Prelude.Read, Int -> DeregisterType -> ShowS
[DeregisterType] -> ShowS
DeregisterType -> String
(Int -> DeregisterType -> ShowS)
-> (DeregisterType -> String)
-> ([DeregisterType] -> ShowS)
-> Show DeregisterType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterType] -> ShowS
$cshowList :: [DeregisterType] -> ShowS
show :: DeregisterType -> String
$cshow :: DeregisterType -> String
showsPrec :: Int -> DeregisterType -> ShowS
$cshowsPrec :: Int -> DeregisterType -> ShowS
Prelude.Show, (forall x. DeregisterType -> Rep DeregisterType x)
-> (forall x. Rep DeregisterType x -> DeregisterType)
-> Generic DeregisterType
forall x. Rep DeregisterType x -> DeregisterType
forall x. DeregisterType -> Rep DeregisterType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeregisterType x -> DeregisterType
$cfrom :: forall x. DeregisterType -> Rep DeregisterType x
Prelude.Generic)
newDeregisterType ::
DeregisterType
newDeregisterType :: DeregisterType
newDeregisterType =
DeregisterType' :: Maybe Text
-> Maybe Text -> Maybe Text -> Maybe RegistryType -> DeregisterType
DeregisterType'
{ $sel:versionId:DeregisterType' :: Maybe Text
versionId = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:typeName:DeregisterType' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DeregisterType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':DeregisterType' :: Maybe RegistryType
type' = Maybe RegistryType
forall a. Maybe a
Prelude.Nothing
}
deregisterType_versionId :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_versionId :: (Maybe Text -> f (Maybe Text))
-> DeregisterType -> f DeregisterType
deregisterType_versionId = (DeregisterType -> Maybe Text)
-> (DeregisterType -> Maybe Text -> DeregisterType)
-> Lens DeregisterType DeregisterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterType' {Maybe Text
versionId :: Maybe Text
$sel:versionId:DeregisterType' :: DeregisterType -> Maybe Text
versionId} -> Maybe Text
versionId) (\s :: DeregisterType
s@DeregisterType' {} Maybe Text
a -> DeregisterType
s {$sel:versionId:DeregisterType' :: Maybe Text
versionId = Maybe Text
a} :: DeregisterType)
deregisterType_typeName :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_typeName :: (Maybe Text -> f (Maybe Text))
-> DeregisterType -> f DeregisterType
deregisterType_typeName = (DeregisterType -> Maybe Text)
-> (DeregisterType -> Maybe Text -> DeregisterType)
-> Lens DeregisterType DeregisterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterType' {Maybe Text
typeName :: Maybe Text
$sel:typeName:DeregisterType' :: DeregisterType -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: DeregisterType
s@DeregisterType' {} Maybe Text
a -> DeregisterType
s {$sel:typeName:DeregisterType' :: Maybe Text
typeName = Maybe Text
a} :: DeregisterType)
deregisterType_arn :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_arn :: (Maybe Text -> f (Maybe Text))
-> DeregisterType -> f DeregisterType
deregisterType_arn = (DeregisterType -> Maybe Text)
-> (DeregisterType -> Maybe Text -> DeregisterType)
-> Lens DeregisterType DeregisterType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterType' {Maybe Text
arn :: Maybe Text
$sel:arn:DeregisterType' :: DeregisterType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DeregisterType
s@DeregisterType' {} Maybe Text
a -> DeregisterType
s {$sel:arn:DeregisterType' :: Maybe Text
arn = Maybe Text
a} :: DeregisterType)
deregisterType_type :: Lens.Lens' DeregisterType (Prelude.Maybe RegistryType)
deregisterType_type :: (Maybe RegistryType -> f (Maybe RegistryType))
-> DeregisterType -> f DeregisterType
deregisterType_type = (DeregisterType -> Maybe RegistryType)
-> (DeregisterType -> Maybe RegistryType -> DeregisterType)
-> Lens
DeregisterType
DeregisterType
(Maybe RegistryType)
(Maybe RegistryType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterType' {Maybe RegistryType
type' :: Maybe RegistryType
$sel:type':DeregisterType' :: DeregisterType -> Maybe RegistryType
type'} -> Maybe RegistryType
type') (\s :: DeregisterType
s@DeregisterType' {} Maybe RegistryType
a -> DeregisterType
s {$sel:type':DeregisterType' :: Maybe RegistryType
type' = Maybe RegistryType
a} :: DeregisterType)
instance Core.AWSRequest DeregisterType where
type
AWSResponse DeregisterType =
DeregisterTypeResponse
request :: DeregisterType -> Request DeregisterType
request = Service -> DeregisterType -> Request DeregisterType
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeregisterType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeregisterType)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeregisterType))
-> Logger
-> Service
-> Proxy DeregisterType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeregisterType)))
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeregisterTypeResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeregisterTypeResponse
DeregisterTypeResponse'
(Int -> DeregisterTypeResponse)
-> Either String Int -> Either String DeregisterTypeResponse
forall (f :: * -> *) a b. Functor 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 DeregisterType
instance Prelude.NFData DeregisterType
instance Core.ToHeaders DeregisterType where
toHeaders :: DeregisterType -> ResponseHeaders
toHeaders = ResponseHeaders -> DeregisterType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeregisterType where
toPath :: DeregisterType -> ByteString
toPath = ByteString -> DeregisterType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeregisterType where
toQuery :: DeregisterType -> QueryString
toQuery DeregisterType' {Maybe Text
Maybe RegistryType
type' :: Maybe RegistryType
arn :: Maybe Text
typeName :: Maybe Text
versionId :: Maybe Text
$sel:type':DeregisterType' :: DeregisterType -> Maybe RegistryType
$sel:arn:DeregisterType' :: DeregisterType -> Maybe Text
$sel:typeName:DeregisterType' :: DeregisterType -> Maybe Text
$sel:versionId:DeregisterType' :: DeregisterType -> Maybe Text
..} =
[QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"DeregisterType" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"VersionId" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
versionId,
ByteString
"TypeName" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
typeName,
ByteString
"Arn" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
arn,
ByteString
"Type" ByteString -> Maybe RegistryType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RegistryType
type'
]
data DeregisterTypeResponse = DeregisterTypeResponse'
{
DeregisterTypeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
(DeregisterTypeResponse -> DeregisterTypeResponse -> Bool)
-> (DeregisterTypeResponse -> DeregisterTypeResponse -> Bool)
-> Eq DeregisterTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
$c/= :: DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
== :: DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
$c== :: DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
Prelude.Eq, ReadPrec [DeregisterTypeResponse]
ReadPrec DeregisterTypeResponse
Int -> ReadS DeregisterTypeResponse
ReadS [DeregisterTypeResponse]
(Int -> ReadS DeregisterTypeResponse)
-> ReadS [DeregisterTypeResponse]
-> ReadPrec DeregisterTypeResponse
-> ReadPrec [DeregisterTypeResponse]
-> Read DeregisterTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeregisterTypeResponse]
$creadListPrec :: ReadPrec [DeregisterTypeResponse]
readPrec :: ReadPrec DeregisterTypeResponse
$creadPrec :: ReadPrec DeregisterTypeResponse
readList :: ReadS [DeregisterTypeResponse]
$creadList :: ReadS [DeregisterTypeResponse]
readsPrec :: Int -> ReadS DeregisterTypeResponse
$creadsPrec :: Int -> ReadS DeregisterTypeResponse
Prelude.Read, Int -> DeregisterTypeResponse -> ShowS
[DeregisterTypeResponse] -> ShowS
DeregisterTypeResponse -> String
(Int -> DeregisterTypeResponse -> ShowS)
-> (DeregisterTypeResponse -> String)
-> ([DeregisterTypeResponse] -> ShowS)
-> Show DeregisterTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeregisterTypeResponse] -> ShowS
$cshowList :: [DeregisterTypeResponse] -> ShowS
show :: DeregisterTypeResponse -> String
$cshow :: DeregisterTypeResponse -> String
showsPrec :: Int -> DeregisterTypeResponse -> ShowS
$cshowsPrec :: Int -> DeregisterTypeResponse -> ShowS
Prelude.Show, (forall x. DeregisterTypeResponse -> Rep DeregisterTypeResponse x)
-> (forall x.
Rep DeregisterTypeResponse x -> DeregisterTypeResponse)
-> Generic DeregisterTypeResponse
forall x. Rep DeregisterTypeResponse x -> DeregisterTypeResponse
forall x. DeregisterTypeResponse -> Rep DeregisterTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeregisterTypeResponse x -> DeregisterTypeResponse
$cfrom :: forall x. DeregisterTypeResponse -> Rep DeregisterTypeResponse x
Prelude.Generic)
newDeregisterTypeResponse ::
Prelude.Int ->
DeregisterTypeResponse
newDeregisterTypeResponse :: Int -> DeregisterTypeResponse
newDeregisterTypeResponse Int
pHttpStatus_ =
DeregisterTypeResponse' :: Int -> DeregisterTypeResponse
DeregisterTypeResponse' {$sel:httpStatus:DeregisterTypeResponse' :: Int
httpStatus = Int
pHttpStatus_}
deregisterTypeResponse_httpStatus :: Lens.Lens' DeregisterTypeResponse Prelude.Int
deregisterTypeResponse_httpStatus :: (Int -> f Int)
-> DeregisterTypeResponse -> f DeregisterTypeResponse
deregisterTypeResponse_httpStatus = (DeregisterTypeResponse -> Int)
-> (DeregisterTypeResponse -> Int -> DeregisterTypeResponse)
-> Lens DeregisterTypeResponse DeregisterTypeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeregisterTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeregisterTypeResponse' :: DeregisterTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeregisterTypeResponse
s@DeregisterTypeResponse' {} Int
a -> DeregisterTypeResponse
s {$sel:httpStatus:DeregisterTypeResponse' :: Int
httpStatus = Int
a} :: DeregisterTypeResponse)
instance Prelude.NFData DeregisterTypeResponse