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