{-# 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.AlexaBusiness.DeleteGatewayGroup
(
DeleteGatewayGroup (..),
newDeleteGatewayGroup,
deleteGatewayGroup_gatewayGroupArn,
DeleteGatewayGroupResponse (..),
newDeleteGatewayGroupResponse,
deleteGatewayGroupResponse_httpStatus,
)
where
import Amazonka.AlexaBusiness.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 DeleteGatewayGroup = DeleteGatewayGroup'
{
DeleteGatewayGroup -> Text
gatewayGroupArn :: Prelude.Text
}
deriving (DeleteGatewayGroup -> DeleteGatewayGroup -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGatewayGroup -> DeleteGatewayGroup -> Bool
$c/= :: DeleteGatewayGroup -> DeleteGatewayGroup -> Bool
== :: DeleteGatewayGroup -> DeleteGatewayGroup -> Bool
$c== :: DeleteGatewayGroup -> DeleteGatewayGroup -> Bool
Prelude.Eq, ReadPrec [DeleteGatewayGroup]
ReadPrec DeleteGatewayGroup
Int -> ReadS DeleteGatewayGroup
ReadS [DeleteGatewayGroup]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGatewayGroup]
$creadListPrec :: ReadPrec [DeleteGatewayGroup]
readPrec :: ReadPrec DeleteGatewayGroup
$creadPrec :: ReadPrec DeleteGatewayGroup
readList :: ReadS [DeleteGatewayGroup]
$creadList :: ReadS [DeleteGatewayGroup]
readsPrec :: Int -> ReadS DeleteGatewayGroup
$creadsPrec :: Int -> ReadS DeleteGatewayGroup
Prelude.Read, Int -> DeleteGatewayGroup -> ShowS
[DeleteGatewayGroup] -> ShowS
DeleteGatewayGroup -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGatewayGroup] -> ShowS
$cshowList :: [DeleteGatewayGroup] -> ShowS
show :: DeleteGatewayGroup -> String
$cshow :: DeleteGatewayGroup -> String
showsPrec :: Int -> DeleteGatewayGroup -> ShowS
$cshowsPrec :: Int -> DeleteGatewayGroup -> ShowS
Prelude.Show, forall x. Rep DeleteGatewayGroup x -> DeleteGatewayGroup
forall x. DeleteGatewayGroup -> Rep DeleteGatewayGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteGatewayGroup x -> DeleteGatewayGroup
$cfrom :: forall x. DeleteGatewayGroup -> Rep DeleteGatewayGroup x
Prelude.Generic)
newDeleteGatewayGroup ::
Prelude.Text ->
DeleteGatewayGroup
newDeleteGatewayGroup :: Text -> DeleteGatewayGroup
newDeleteGatewayGroup Text
pGatewayGroupArn_ =
DeleteGatewayGroup'
{ $sel:gatewayGroupArn:DeleteGatewayGroup' :: Text
gatewayGroupArn =
Text
pGatewayGroupArn_
}
deleteGatewayGroup_gatewayGroupArn :: Lens.Lens' DeleteGatewayGroup Prelude.Text
deleteGatewayGroup_gatewayGroupArn :: Lens' DeleteGatewayGroup Text
deleteGatewayGroup_gatewayGroupArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGatewayGroup' {Text
gatewayGroupArn :: Text
$sel:gatewayGroupArn:DeleteGatewayGroup' :: DeleteGatewayGroup -> Text
gatewayGroupArn} -> Text
gatewayGroupArn) (\s :: DeleteGatewayGroup
s@DeleteGatewayGroup' {} Text
a -> DeleteGatewayGroup
s {$sel:gatewayGroupArn:DeleteGatewayGroup' :: Text
gatewayGroupArn = Text
a} :: DeleteGatewayGroup)
instance Core.AWSRequest DeleteGatewayGroup where
type
AWSResponse DeleteGatewayGroup =
DeleteGatewayGroupResponse
request :: (Service -> Service)
-> DeleteGatewayGroup -> Request DeleteGatewayGroup
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteGatewayGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGatewayGroup)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteGatewayGroupResponse
DeleteGatewayGroupResponse'
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 DeleteGatewayGroup where
hashWithSalt :: Int -> DeleteGatewayGroup -> Int
hashWithSalt Int
_salt DeleteGatewayGroup' {Text
gatewayGroupArn :: Text
$sel:gatewayGroupArn:DeleteGatewayGroup' :: DeleteGatewayGroup -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
gatewayGroupArn
instance Prelude.NFData DeleteGatewayGroup where
rnf :: DeleteGatewayGroup -> ()
rnf DeleteGatewayGroup' {Text
gatewayGroupArn :: Text
$sel:gatewayGroupArn:DeleteGatewayGroup' :: DeleteGatewayGroup -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
gatewayGroupArn
instance Data.ToHeaders DeleteGatewayGroup where
toHeaders :: DeleteGatewayGroup -> ResponseHeaders
toHeaders =
forall a b. a -> b -> a
Prelude.const
( forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"X-Amz-Target"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"AlexaForBusiness.DeleteGatewayGroup" ::
Prelude.ByteString
),
HeaderName
"Content-Type"
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteGatewayGroup where
toJSON :: DeleteGatewayGroup -> Value
toJSON DeleteGatewayGroup' {Text
gatewayGroupArn :: Text
$sel:gatewayGroupArn:DeleteGatewayGroup' :: DeleteGatewayGroup -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"GatewayGroupArn" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
gatewayGroupArn)
]
)
instance Data.ToPath DeleteGatewayGroup where
toPath :: DeleteGatewayGroup -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery DeleteGatewayGroup where
toQuery :: DeleteGatewayGroup -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data DeleteGatewayGroupResponse = DeleteGatewayGroupResponse'
{
DeleteGatewayGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
$c/= :: DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
== :: DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
$c== :: DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
Prelude.Eq, ReadPrec [DeleteGatewayGroupResponse]
ReadPrec DeleteGatewayGroupResponse
Int -> ReadS DeleteGatewayGroupResponse
ReadS [DeleteGatewayGroupResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteGatewayGroupResponse]
$creadListPrec :: ReadPrec [DeleteGatewayGroupResponse]
readPrec :: ReadPrec DeleteGatewayGroupResponse
$creadPrec :: ReadPrec DeleteGatewayGroupResponse
readList :: ReadS [DeleteGatewayGroupResponse]
$creadList :: ReadS [DeleteGatewayGroupResponse]
readsPrec :: Int -> ReadS DeleteGatewayGroupResponse
$creadsPrec :: Int -> ReadS DeleteGatewayGroupResponse
Prelude.Read, Int -> DeleteGatewayGroupResponse -> ShowS
[DeleteGatewayGroupResponse] -> ShowS
DeleteGatewayGroupResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteGatewayGroupResponse] -> ShowS
$cshowList :: [DeleteGatewayGroupResponse] -> ShowS
show :: DeleteGatewayGroupResponse -> String
$cshow :: DeleteGatewayGroupResponse -> String
showsPrec :: Int -> DeleteGatewayGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteGatewayGroupResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteGatewayGroupResponse x -> DeleteGatewayGroupResponse
forall x.
DeleteGatewayGroupResponse -> Rep DeleteGatewayGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteGatewayGroupResponse x -> DeleteGatewayGroupResponse
$cfrom :: forall x.
DeleteGatewayGroupResponse -> Rep DeleteGatewayGroupResponse x
Prelude.Generic)
newDeleteGatewayGroupResponse ::
Prelude.Int ->
DeleteGatewayGroupResponse
newDeleteGatewayGroupResponse :: Int -> DeleteGatewayGroupResponse
newDeleteGatewayGroupResponse Int
pHttpStatus_ =
DeleteGatewayGroupResponse'
{ $sel:httpStatus:DeleteGatewayGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteGatewayGroupResponse_httpStatus :: Lens.Lens' DeleteGatewayGroupResponse Prelude.Int
deleteGatewayGroupResponse_httpStatus :: Lens' DeleteGatewayGroupResponse Int
deleteGatewayGroupResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteGatewayGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteGatewayGroupResponse' :: DeleteGatewayGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteGatewayGroupResponse
s@DeleteGatewayGroupResponse' {} Int
a -> DeleteGatewayGroupResponse
s {$sel:httpStatus:DeleteGatewayGroupResponse' :: Int
httpStatus = Int
a} :: DeleteGatewayGroupResponse)
instance Prelude.NFData DeleteGatewayGroupResponse where
rnf :: DeleteGatewayGroupResponse -> ()
rnf DeleteGatewayGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteGatewayGroupResponse' :: DeleteGatewayGroupResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus