{-# 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_arn,
deregisterType_type,
deregisterType_typeName,
deregisterType_versionId,
DeregisterTypeResponse (..),
newDeregisterTypeResponse,
deregisterTypeResponse_httpStatus,
)
where
import Amazonka.CloudFormation.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data DeregisterType = DeregisterType'
{
DeregisterType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DeregisterType -> Maybe RegistryType
type' :: Prelude.Maybe RegistryType,
DeregisterType -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
DeregisterType -> Maybe Text
versionId :: Prelude.Maybe Prelude.Text
}
deriving (DeregisterType -> DeregisterType -> Bool
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]
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
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. 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'
{ $sel:arn:DeregisterType' :: Maybe Text
arn = forall a. Maybe a
Prelude.Nothing,
$sel:type':DeregisterType' :: Maybe RegistryType
type' = forall a. Maybe a
Prelude.Nothing,
$sel:typeName:DeregisterType' :: Maybe Text
typeName = forall a. Maybe a
Prelude.Nothing,
$sel:versionId:DeregisterType' :: Maybe Text
versionId = forall a. Maybe a
Prelude.Nothing
}
deregisterType_arn :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_arn :: Lens' DeregisterType (Maybe Text)
deregisterType_arn = 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 :: Lens' DeregisterType (Maybe RegistryType)
deregisterType_type = 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)
deregisterType_typeName :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_typeName :: Lens' DeregisterType (Maybe Text)
deregisterType_typeName = 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_versionId :: Lens.Lens' DeregisterType (Prelude.Maybe Prelude.Text)
deregisterType_versionId :: Lens' DeregisterType (Maybe Text)
deregisterType_versionId = 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)
instance Core.AWSRequest DeregisterType where
type
AWSResponse DeregisterType =
DeregisterTypeResponse
request :: (Service -> Service) -> DeregisterType -> Request DeregisterType
request Service -> Service
overrides =
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeregisterType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeregisterType)))
response =
forall (m :: * -> *) a.
MonadResource m =>
Text
-> (Int
-> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXMLWrapper
Text
"DeregisterTypeResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeregisterTypeResponse
DeregisterTypeResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
)
instance Prelude.Hashable DeregisterType where
hashWithSalt :: Int -> DeregisterType -> Int
hashWithSalt Int
_salt DeregisterType' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:DeregisterType' :: DeregisterType -> Maybe Text
$sel:typeName:DeregisterType' :: DeregisterType -> Maybe Text
$sel:type':DeregisterType' :: DeregisterType -> Maybe RegistryType
$sel:arn:DeregisterType' :: DeregisterType -> Maybe Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
arn
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RegistryType
type'
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
typeName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
versionId
instance Prelude.NFData DeregisterType where
rnf :: DeregisterType -> ()
rnf DeregisterType' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:DeregisterType' :: DeregisterType -> Maybe Text
$sel:typeName:DeregisterType' :: DeregisterType -> Maybe Text
$sel:type':DeregisterType' :: DeregisterType -> Maybe RegistryType
$sel:arn:DeregisterType' :: DeregisterType -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
arn
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RegistryType
type'
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
typeName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
versionId
instance Data.ToHeaders DeregisterType where
toHeaders :: DeregisterType -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath DeregisterType where
toPath :: DeregisterType -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeregisterType where
toQuery :: DeregisterType -> QueryString
toQuery DeregisterType' {Maybe Text
Maybe RegistryType
versionId :: Maybe Text
typeName :: Maybe Text
type' :: Maybe RegistryType
arn :: Maybe Text
$sel:versionId:DeregisterType' :: DeregisterType -> Maybe Text
$sel:typeName:DeregisterType' :: DeregisterType -> Maybe Text
$sel:type':DeregisterType' :: DeregisterType -> Maybe RegistryType
$sel:arn:DeregisterType' :: DeregisterType -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"Action"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DeregisterType" :: Prelude.ByteString),
ByteString
"Version"
forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
ByteString
"Arn" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
arn,
ByteString
"Type" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe RegistryType
type',
ByteString
"TypeName" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
typeName,
ByteString
"VersionId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
versionId
]
data DeregisterTypeResponse = DeregisterTypeResponse'
{
DeregisterTypeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeregisterTypeResponse -> DeregisterTypeResponse -> Bool
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]
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
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. 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' {$sel:httpStatus:DeregisterTypeResponse' :: Int
httpStatus = Int
pHttpStatus_}
deregisterTypeResponse_httpStatus :: Lens.Lens' DeregisterTypeResponse Prelude.Int
deregisterTypeResponse_httpStatus :: Lens' DeregisterTypeResponse Int
deregisterTypeResponse_httpStatus = 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 where
rnf :: DeregisterTypeResponse -> ()
rnf DeregisterTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeregisterTypeResponse' :: DeregisterTypeResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus