{-# 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.Lens as Lens
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
(DeleteGatewayGroup -> DeleteGatewayGroup -> Bool)
-> (DeleteGatewayGroup -> DeleteGatewayGroup -> Bool)
-> Eq DeleteGatewayGroup
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]
(Int -> ReadS DeleteGatewayGroup)
-> ReadS [DeleteGatewayGroup]
-> ReadPrec DeleteGatewayGroup
-> ReadPrec [DeleteGatewayGroup]
-> Read 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
(Int -> DeleteGatewayGroup -> ShowS)
-> (DeleteGatewayGroup -> String)
-> ([DeleteGatewayGroup] -> ShowS)
-> Show DeleteGatewayGroup
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. DeleteGatewayGroup -> Rep DeleteGatewayGroup x)
-> (forall x. Rep DeleteGatewayGroup x -> DeleteGatewayGroup)
-> Generic DeleteGatewayGroup
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' :: Text -> DeleteGatewayGroup
DeleteGatewayGroup'
{ $sel:gatewayGroupArn:DeleteGatewayGroup' :: Text
gatewayGroupArn =
Text
pGatewayGroupArn_
}
deleteGatewayGroup_gatewayGroupArn :: Lens.Lens' DeleteGatewayGroup Prelude.Text
deleteGatewayGroup_gatewayGroupArn :: (Text -> f Text) -> DeleteGatewayGroup -> f DeleteGatewayGroup
deleteGatewayGroup_gatewayGroupArn = (DeleteGatewayGroup -> Text)
-> (DeleteGatewayGroup -> Text -> DeleteGatewayGroup)
-> Lens DeleteGatewayGroup DeleteGatewayGroup Text Text
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 :: DeleteGatewayGroup -> Request DeleteGatewayGroup
request = Service -> DeleteGatewayGroup -> Request DeleteGatewayGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteGatewayGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGatewayGroup)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteGatewayGroup))
-> Logger
-> Service
-> Proxy DeleteGatewayGroup
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DeleteGatewayGroup)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> () -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveEmpty
( \Int
s ResponseHeaders
h ()
x ->
Int -> DeleteGatewayGroupResponse
DeleteGatewayGroupResponse'
(Int -> DeleteGatewayGroupResponse)
-> Either String Int -> Either String DeleteGatewayGroupResponse
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 DeleteGatewayGroup
instance Prelude.NFData DeleteGatewayGroup
instance Core.ToHeaders DeleteGatewayGroup where
toHeaders :: DeleteGatewayGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteGatewayGroup -> 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
"AlexaForBusiness.DeleteGatewayGroup" ::
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 DeleteGatewayGroup where
toJSON :: DeleteGatewayGroup -> Value
toJSON DeleteGatewayGroup' {Text
gatewayGroupArn :: Text
$sel:gatewayGroupArn:DeleteGatewayGroup' :: DeleteGatewayGroup -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"GatewayGroupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
gatewayGroupArn)
]
)
instance Core.ToPath DeleteGatewayGroup where
toPath :: DeleteGatewayGroup -> ByteString
toPath = ByteString -> DeleteGatewayGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteGatewayGroup where
toQuery :: DeleteGatewayGroup -> QueryString
toQuery = QueryString -> DeleteGatewayGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteGatewayGroupResponse = DeleteGatewayGroupResponse'
{
DeleteGatewayGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool
(DeleteGatewayGroupResponse -> DeleteGatewayGroupResponse -> Bool)
-> (DeleteGatewayGroupResponse
-> DeleteGatewayGroupResponse -> Bool)
-> Eq DeleteGatewayGroupResponse
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]
(Int -> ReadS DeleteGatewayGroupResponse)
-> ReadS [DeleteGatewayGroupResponse]
-> ReadPrec DeleteGatewayGroupResponse
-> ReadPrec [DeleteGatewayGroupResponse]
-> Read 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
(Int -> DeleteGatewayGroupResponse -> ShowS)
-> (DeleteGatewayGroupResponse -> String)
-> ([DeleteGatewayGroupResponse] -> ShowS)
-> Show DeleteGatewayGroupResponse
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.
DeleteGatewayGroupResponse -> Rep DeleteGatewayGroupResponse x)
-> (forall x.
Rep DeleteGatewayGroupResponse x -> DeleteGatewayGroupResponse)
-> Generic DeleteGatewayGroupResponse
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' :: Int -> DeleteGatewayGroupResponse
DeleteGatewayGroupResponse'
{ $sel:httpStatus:DeleteGatewayGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteGatewayGroupResponse_httpStatus :: Lens.Lens' DeleteGatewayGroupResponse Prelude.Int
deleteGatewayGroupResponse_httpStatus :: (Int -> f Int)
-> DeleteGatewayGroupResponse -> f DeleteGatewayGroupResponse
deleteGatewayGroupResponse_httpStatus = (DeleteGatewayGroupResponse -> Int)
-> (DeleteGatewayGroupResponse
-> Int -> DeleteGatewayGroupResponse)
-> Lens
DeleteGatewayGroupResponse DeleteGatewayGroupResponse Int Int
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