{-# 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.DeactivateType
(
DeactivateType (..),
newDeactivateType,
deactivateType_typeName,
deactivateType_arn,
deactivateType_type,
DeactivateTypeResponse (..),
newDeactivateTypeResponse,
deactivateTypeResponse_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 DeactivateType = DeactivateType'
{
DeactivateType -> Maybe Text
typeName :: Prelude.Maybe Prelude.Text,
DeactivateType -> Maybe Text
arn :: Prelude.Maybe Prelude.Text,
DeactivateType -> Maybe ThirdPartyType
type' :: Prelude.Maybe ThirdPartyType
}
deriving (DeactivateType -> DeactivateType -> Bool
(DeactivateType -> DeactivateType -> Bool)
-> (DeactivateType -> DeactivateType -> Bool) -> Eq DeactivateType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeactivateType -> DeactivateType -> Bool
$c/= :: DeactivateType -> DeactivateType -> Bool
== :: DeactivateType -> DeactivateType -> Bool
$c== :: DeactivateType -> DeactivateType -> Bool
Prelude.Eq, ReadPrec [DeactivateType]
ReadPrec DeactivateType
Int -> ReadS DeactivateType
ReadS [DeactivateType]
(Int -> ReadS DeactivateType)
-> ReadS [DeactivateType]
-> ReadPrec DeactivateType
-> ReadPrec [DeactivateType]
-> Read DeactivateType
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeactivateType]
$creadListPrec :: ReadPrec [DeactivateType]
readPrec :: ReadPrec DeactivateType
$creadPrec :: ReadPrec DeactivateType
readList :: ReadS [DeactivateType]
$creadList :: ReadS [DeactivateType]
readsPrec :: Int -> ReadS DeactivateType
$creadsPrec :: Int -> ReadS DeactivateType
Prelude.Read, Int -> DeactivateType -> ShowS
[DeactivateType] -> ShowS
DeactivateType -> String
(Int -> DeactivateType -> ShowS)
-> (DeactivateType -> String)
-> ([DeactivateType] -> ShowS)
-> Show DeactivateType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeactivateType] -> ShowS
$cshowList :: [DeactivateType] -> ShowS
show :: DeactivateType -> String
$cshow :: DeactivateType -> String
showsPrec :: Int -> DeactivateType -> ShowS
$cshowsPrec :: Int -> DeactivateType -> ShowS
Prelude.Show, (forall x. DeactivateType -> Rep DeactivateType x)
-> (forall x. Rep DeactivateType x -> DeactivateType)
-> Generic DeactivateType
forall x. Rep DeactivateType x -> DeactivateType
forall x. DeactivateType -> Rep DeactivateType x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeactivateType x -> DeactivateType
$cfrom :: forall x. DeactivateType -> Rep DeactivateType x
Prelude.Generic)
newDeactivateType ::
DeactivateType
newDeactivateType :: DeactivateType
newDeactivateType =
DeactivateType' :: Maybe Text -> Maybe Text -> Maybe ThirdPartyType -> DeactivateType
DeactivateType'
{ $sel:typeName:DeactivateType' :: Maybe Text
typeName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:arn:DeactivateType' :: Maybe Text
arn = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:type':DeactivateType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
forall a. Maybe a
Prelude.Nothing
}
deactivateType_typeName :: Lens.Lens' DeactivateType (Prelude.Maybe Prelude.Text)
deactivateType_typeName :: (Maybe Text -> f (Maybe Text))
-> DeactivateType -> f DeactivateType
deactivateType_typeName = (DeactivateType -> Maybe Text)
-> (DeactivateType -> Maybe Text -> DeactivateType)
-> Lens DeactivateType DeactivateType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeactivateType' {Maybe Text
typeName :: Maybe Text
$sel:typeName:DeactivateType' :: DeactivateType -> Maybe Text
typeName} -> Maybe Text
typeName) (\s :: DeactivateType
s@DeactivateType' {} Maybe Text
a -> DeactivateType
s {$sel:typeName:DeactivateType' :: Maybe Text
typeName = Maybe Text
a} :: DeactivateType)
deactivateType_arn :: Lens.Lens' DeactivateType (Prelude.Maybe Prelude.Text)
deactivateType_arn :: (Maybe Text -> f (Maybe Text))
-> DeactivateType -> f DeactivateType
deactivateType_arn = (DeactivateType -> Maybe Text)
-> (DeactivateType -> Maybe Text -> DeactivateType)
-> Lens DeactivateType DeactivateType (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeactivateType' {Maybe Text
arn :: Maybe Text
$sel:arn:DeactivateType' :: DeactivateType -> Maybe Text
arn} -> Maybe Text
arn) (\s :: DeactivateType
s@DeactivateType' {} Maybe Text
a -> DeactivateType
s {$sel:arn:DeactivateType' :: Maybe Text
arn = Maybe Text
a} :: DeactivateType)
deactivateType_type :: Lens.Lens' DeactivateType (Prelude.Maybe ThirdPartyType)
deactivateType_type :: (Maybe ThirdPartyType -> f (Maybe ThirdPartyType))
-> DeactivateType -> f DeactivateType
deactivateType_type = (DeactivateType -> Maybe ThirdPartyType)
-> (DeactivateType -> Maybe ThirdPartyType -> DeactivateType)
-> Lens
DeactivateType
DeactivateType
(Maybe ThirdPartyType)
(Maybe ThirdPartyType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeactivateType' {Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
$sel:type':DeactivateType' :: DeactivateType -> Maybe ThirdPartyType
type'} -> Maybe ThirdPartyType
type') (\s :: DeactivateType
s@DeactivateType' {} Maybe ThirdPartyType
a -> DeactivateType
s {$sel:type':DeactivateType' :: Maybe ThirdPartyType
type' = Maybe ThirdPartyType
a} :: DeactivateType)
instance Core.AWSRequest DeactivateType where
type
AWSResponse DeactivateType =
DeactivateTypeResponse
request :: DeactivateType -> Request DeactivateType
request = Service -> DeactivateType -> Request DeactivateType
forall a. ToRequest a => Service -> a -> Request a
Request.postQuery Service
defaultService
response :: Logger
-> Service
-> Proxy DeactivateType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeactivateType)))
response =
Text
-> (Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse DeactivateType))
-> Logger
-> Service
-> Proxy DeactivateType
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeactivateType)))
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
"DeactivateTypeResult"
( \Int
s ResponseHeaders
h [Node]
x ->
Int -> DeactivateTypeResponse
DeactivateTypeResponse'
(Int -> DeactivateTypeResponse)
-> Either String Int -> Either String DeactivateTypeResponse
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 DeactivateType
instance Prelude.NFData DeactivateType
instance Core.ToHeaders DeactivateType where
toHeaders :: DeactivateType -> ResponseHeaders
toHeaders = ResponseHeaders -> DeactivateType -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath DeactivateType where
toPath :: DeactivateType -> ByteString
toPath = ByteString -> DeactivateType -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeactivateType where
toQuery :: DeactivateType -> QueryString
toQuery DeactivateType' {Maybe Text
Maybe ThirdPartyType
type' :: Maybe ThirdPartyType
arn :: Maybe Text
typeName :: Maybe Text
$sel:type':DeactivateType' :: DeactivateType -> Maybe ThirdPartyType
$sel:arn:DeactivateType' :: DeactivateType -> Maybe Text
$sel:typeName:DeactivateType' :: DeactivateType -> 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
"DeactivateType" :: Prelude.ByteString),
ByteString
"Version"
ByteString -> ByteString -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: (ByteString
"2010-05-15" :: Prelude.ByteString),
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 ThirdPartyType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ThirdPartyType
type'
]
data DeactivateTypeResponse = DeactivateTypeResponse'
{
DeactivateTypeResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeactivateTypeResponse -> DeactivateTypeResponse -> Bool
(DeactivateTypeResponse -> DeactivateTypeResponse -> Bool)
-> (DeactivateTypeResponse -> DeactivateTypeResponse -> Bool)
-> Eq DeactivateTypeResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeactivateTypeResponse -> DeactivateTypeResponse -> Bool
$c/= :: DeactivateTypeResponse -> DeactivateTypeResponse -> Bool
== :: DeactivateTypeResponse -> DeactivateTypeResponse -> Bool
$c== :: DeactivateTypeResponse -> DeactivateTypeResponse -> Bool
Prelude.Eq, ReadPrec [DeactivateTypeResponse]
ReadPrec DeactivateTypeResponse
Int -> ReadS DeactivateTypeResponse
ReadS [DeactivateTypeResponse]
(Int -> ReadS DeactivateTypeResponse)
-> ReadS [DeactivateTypeResponse]
-> ReadPrec DeactivateTypeResponse
-> ReadPrec [DeactivateTypeResponse]
-> Read DeactivateTypeResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeactivateTypeResponse]
$creadListPrec :: ReadPrec [DeactivateTypeResponse]
readPrec :: ReadPrec DeactivateTypeResponse
$creadPrec :: ReadPrec DeactivateTypeResponse
readList :: ReadS [DeactivateTypeResponse]
$creadList :: ReadS [DeactivateTypeResponse]
readsPrec :: Int -> ReadS DeactivateTypeResponse
$creadsPrec :: Int -> ReadS DeactivateTypeResponse
Prelude.Read, Int -> DeactivateTypeResponse -> ShowS
[DeactivateTypeResponse] -> ShowS
DeactivateTypeResponse -> String
(Int -> DeactivateTypeResponse -> ShowS)
-> (DeactivateTypeResponse -> String)
-> ([DeactivateTypeResponse] -> ShowS)
-> Show DeactivateTypeResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeactivateTypeResponse] -> ShowS
$cshowList :: [DeactivateTypeResponse] -> ShowS
show :: DeactivateTypeResponse -> String
$cshow :: DeactivateTypeResponse -> String
showsPrec :: Int -> DeactivateTypeResponse -> ShowS
$cshowsPrec :: Int -> DeactivateTypeResponse -> ShowS
Prelude.Show, (forall x. DeactivateTypeResponse -> Rep DeactivateTypeResponse x)
-> (forall x.
Rep DeactivateTypeResponse x -> DeactivateTypeResponse)
-> Generic DeactivateTypeResponse
forall x. Rep DeactivateTypeResponse x -> DeactivateTypeResponse
forall x. DeactivateTypeResponse -> Rep DeactivateTypeResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeactivateTypeResponse x -> DeactivateTypeResponse
$cfrom :: forall x. DeactivateTypeResponse -> Rep DeactivateTypeResponse x
Prelude.Generic)
newDeactivateTypeResponse ::
Prelude.Int ->
DeactivateTypeResponse
newDeactivateTypeResponse :: Int -> DeactivateTypeResponse
newDeactivateTypeResponse Int
pHttpStatus_ =
DeactivateTypeResponse' :: Int -> DeactivateTypeResponse
DeactivateTypeResponse' {$sel:httpStatus:DeactivateTypeResponse' :: Int
httpStatus = Int
pHttpStatus_}
deactivateTypeResponse_httpStatus :: Lens.Lens' DeactivateTypeResponse Prelude.Int
deactivateTypeResponse_httpStatus :: (Int -> f Int)
-> DeactivateTypeResponse -> f DeactivateTypeResponse
deactivateTypeResponse_httpStatus = (DeactivateTypeResponse -> Int)
-> (DeactivateTypeResponse -> Int -> DeactivateTypeResponse)
-> Lens DeactivateTypeResponse DeactivateTypeResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeactivateTypeResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeactivateTypeResponse' :: DeactivateTypeResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeactivateTypeResponse
s@DeactivateTypeResponse' {} Int
a -> DeactivateTypeResponse
s {$sel:httpStatus:DeactivateTypeResponse' :: Int
httpStatus = Int
a} :: DeactivateTypeResponse)
instance Prelude.NFData DeactivateTypeResponse