{-# 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.DeleteSkillGroup
(
DeleteSkillGroup (..),
newDeleteSkillGroup,
deleteSkillGroup_skillGroupArn,
DeleteSkillGroupResponse (..),
newDeleteSkillGroupResponse,
deleteSkillGroupResponse_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 DeleteSkillGroup = DeleteSkillGroup'
{
DeleteSkillGroup -> Maybe Text
skillGroupArn :: Prelude.Maybe Prelude.Text
}
deriving (DeleteSkillGroup -> DeleteSkillGroup -> Bool
(DeleteSkillGroup -> DeleteSkillGroup -> Bool)
-> (DeleteSkillGroup -> DeleteSkillGroup -> Bool)
-> Eq DeleteSkillGroup
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSkillGroup -> DeleteSkillGroup -> Bool
$c/= :: DeleteSkillGroup -> DeleteSkillGroup -> Bool
== :: DeleteSkillGroup -> DeleteSkillGroup -> Bool
$c== :: DeleteSkillGroup -> DeleteSkillGroup -> Bool
Prelude.Eq, ReadPrec [DeleteSkillGroup]
ReadPrec DeleteSkillGroup
Int -> ReadS DeleteSkillGroup
ReadS [DeleteSkillGroup]
(Int -> ReadS DeleteSkillGroup)
-> ReadS [DeleteSkillGroup]
-> ReadPrec DeleteSkillGroup
-> ReadPrec [DeleteSkillGroup]
-> Read DeleteSkillGroup
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSkillGroup]
$creadListPrec :: ReadPrec [DeleteSkillGroup]
readPrec :: ReadPrec DeleteSkillGroup
$creadPrec :: ReadPrec DeleteSkillGroup
readList :: ReadS [DeleteSkillGroup]
$creadList :: ReadS [DeleteSkillGroup]
readsPrec :: Int -> ReadS DeleteSkillGroup
$creadsPrec :: Int -> ReadS DeleteSkillGroup
Prelude.Read, Int -> DeleteSkillGroup -> ShowS
[DeleteSkillGroup] -> ShowS
DeleteSkillGroup -> String
(Int -> DeleteSkillGroup -> ShowS)
-> (DeleteSkillGroup -> String)
-> ([DeleteSkillGroup] -> ShowS)
-> Show DeleteSkillGroup
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSkillGroup] -> ShowS
$cshowList :: [DeleteSkillGroup] -> ShowS
show :: DeleteSkillGroup -> String
$cshow :: DeleteSkillGroup -> String
showsPrec :: Int -> DeleteSkillGroup -> ShowS
$cshowsPrec :: Int -> DeleteSkillGroup -> ShowS
Prelude.Show, (forall x. DeleteSkillGroup -> Rep DeleteSkillGroup x)
-> (forall x. Rep DeleteSkillGroup x -> DeleteSkillGroup)
-> Generic DeleteSkillGroup
forall x. Rep DeleteSkillGroup x -> DeleteSkillGroup
forall x. DeleteSkillGroup -> Rep DeleteSkillGroup x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSkillGroup x -> DeleteSkillGroup
$cfrom :: forall x. DeleteSkillGroup -> Rep DeleteSkillGroup x
Prelude.Generic)
newDeleteSkillGroup ::
DeleteSkillGroup
newDeleteSkillGroup :: DeleteSkillGroup
newDeleteSkillGroup =
DeleteSkillGroup' :: Maybe Text -> DeleteSkillGroup
DeleteSkillGroup' {$sel:skillGroupArn:DeleteSkillGroup' :: Maybe Text
skillGroupArn = Maybe Text
forall a. Maybe a
Prelude.Nothing}
deleteSkillGroup_skillGroupArn :: Lens.Lens' DeleteSkillGroup (Prelude.Maybe Prelude.Text)
deleteSkillGroup_skillGroupArn :: (Maybe Text -> f (Maybe Text))
-> DeleteSkillGroup -> f DeleteSkillGroup
deleteSkillGroup_skillGroupArn = (DeleteSkillGroup -> Maybe Text)
-> (DeleteSkillGroup -> Maybe Text -> DeleteSkillGroup)
-> Lens DeleteSkillGroup DeleteSkillGroup (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSkillGroup' {Maybe Text
skillGroupArn :: Maybe Text
$sel:skillGroupArn:DeleteSkillGroup' :: DeleteSkillGroup -> Maybe Text
skillGroupArn} -> Maybe Text
skillGroupArn) (\s :: DeleteSkillGroup
s@DeleteSkillGroup' {} Maybe Text
a -> DeleteSkillGroup
s {$sel:skillGroupArn:DeleteSkillGroup' :: Maybe Text
skillGroupArn = Maybe Text
a} :: DeleteSkillGroup)
instance Core.AWSRequest DeleteSkillGroup where
type
AWSResponse DeleteSkillGroup =
DeleteSkillGroupResponse
request :: DeleteSkillGroup -> Request DeleteSkillGroup
request = Service -> DeleteSkillGroup -> Request DeleteSkillGroup
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy DeleteSkillGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteSkillGroup)))
response =
(Int
-> ResponseHeaders
-> ()
-> Either String (AWSResponse DeleteSkillGroup))
-> Logger
-> Service
-> Proxy DeleteSkillGroup
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse DeleteSkillGroup)))
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 -> DeleteSkillGroupResponse
DeleteSkillGroupResponse'
(Int -> DeleteSkillGroupResponse)
-> Either String Int -> Either String DeleteSkillGroupResponse
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 DeleteSkillGroup
instance Prelude.NFData DeleteSkillGroup
instance Core.ToHeaders DeleteSkillGroup where
toHeaders :: DeleteSkillGroup -> ResponseHeaders
toHeaders =
ResponseHeaders -> DeleteSkillGroup -> 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.DeleteSkillGroup" ::
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 DeleteSkillGroup where
toJSON :: DeleteSkillGroup -> Value
toJSON DeleteSkillGroup' {Maybe Text
skillGroupArn :: Maybe Text
$sel:skillGroupArn:DeleteSkillGroup' :: DeleteSkillGroup -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SkillGroupArn" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
skillGroupArn
]
)
instance Core.ToPath DeleteSkillGroup where
toPath :: DeleteSkillGroup -> ByteString
toPath = ByteString -> DeleteSkillGroup -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery DeleteSkillGroup where
toQuery :: DeleteSkillGroup -> QueryString
toQuery = QueryString -> DeleteSkillGroup -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data DeleteSkillGroupResponse = DeleteSkillGroupResponse'
{
DeleteSkillGroupResponse -> Int
httpStatus :: Prelude.Int
}
deriving (DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool
(DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool)
-> (DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool)
-> Eq DeleteSkillGroupResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool
$c/= :: DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool
== :: DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool
$c== :: DeleteSkillGroupResponse -> DeleteSkillGroupResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSkillGroupResponse]
ReadPrec DeleteSkillGroupResponse
Int -> ReadS DeleteSkillGroupResponse
ReadS [DeleteSkillGroupResponse]
(Int -> ReadS DeleteSkillGroupResponse)
-> ReadS [DeleteSkillGroupResponse]
-> ReadPrec DeleteSkillGroupResponse
-> ReadPrec [DeleteSkillGroupResponse]
-> Read DeleteSkillGroupResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSkillGroupResponse]
$creadListPrec :: ReadPrec [DeleteSkillGroupResponse]
readPrec :: ReadPrec DeleteSkillGroupResponse
$creadPrec :: ReadPrec DeleteSkillGroupResponse
readList :: ReadS [DeleteSkillGroupResponse]
$creadList :: ReadS [DeleteSkillGroupResponse]
readsPrec :: Int -> ReadS DeleteSkillGroupResponse
$creadsPrec :: Int -> ReadS DeleteSkillGroupResponse
Prelude.Read, Int -> DeleteSkillGroupResponse -> ShowS
[DeleteSkillGroupResponse] -> ShowS
DeleteSkillGroupResponse -> String
(Int -> DeleteSkillGroupResponse -> ShowS)
-> (DeleteSkillGroupResponse -> String)
-> ([DeleteSkillGroupResponse] -> ShowS)
-> Show DeleteSkillGroupResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSkillGroupResponse] -> ShowS
$cshowList :: [DeleteSkillGroupResponse] -> ShowS
show :: DeleteSkillGroupResponse -> String
$cshow :: DeleteSkillGroupResponse -> String
showsPrec :: Int -> DeleteSkillGroupResponse -> ShowS
$cshowsPrec :: Int -> DeleteSkillGroupResponse -> ShowS
Prelude.Show, (forall x.
DeleteSkillGroupResponse -> Rep DeleteSkillGroupResponse x)
-> (forall x.
Rep DeleteSkillGroupResponse x -> DeleteSkillGroupResponse)
-> Generic DeleteSkillGroupResponse
forall x.
Rep DeleteSkillGroupResponse x -> DeleteSkillGroupResponse
forall x.
DeleteSkillGroupResponse -> Rep DeleteSkillGroupResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSkillGroupResponse x -> DeleteSkillGroupResponse
$cfrom :: forall x.
DeleteSkillGroupResponse -> Rep DeleteSkillGroupResponse x
Prelude.Generic)
newDeleteSkillGroupResponse ::
Prelude.Int ->
DeleteSkillGroupResponse
newDeleteSkillGroupResponse :: Int -> DeleteSkillGroupResponse
newDeleteSkillGroupResponse Int
pHttpStatus_ =
DeleteSkillGroupResponse' :: Int -> DeleteSkillGroupResponse
DeleteSkillGroupResponse'
{ $sel:httpStatus:DeleteSkillGroupResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
deleteSkillGroupResponse_httpStatus :: Lens.Lens' DeleteSkillGroupResponse Prelude.Int
deleteSkillGroupResponse_httpStatus :: (Int -> f Int)
-> DeleteSkillGroupResponse -> f DeleteSkillGroupResponse
deleteSkillGroupResponse_httpStatus = (DeleteSkillGroupResponse -> Int)
-> (DeleteSkillGroupResponse -> Int -> DeleteSkillGroupResponse)
-> Lens DeleteSkillGroupResponse DeleteSkillGroupResponse Int Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSkillGroupResponse' {Int
httpStatus :: Int
$sel:httpStatus:DeleteSkillGroupResponse' :: DeleteSkillGroupResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: DeleteSkillGroupResponse
s@DeleteSkillGroupResponse' {} Int
a -> DeleteSkillGroupResponse
s {$sel:httpStatus:DeleteSkillGroupResponse' :: Int
httpStatus = Int
a} :: DeleteSkillGroupResponse)
instance Prelude.NFData DeleteSkillGroupResponse