{-# 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.AssociateSkillWithUsers
(
AssociateSkillWithUsers (..),
newAssociateSkillWithUsers,
associateSkillWithUsers_skillId,
AssociateSkillWithUsersResponse (..),
newAssociateSkillWithUsersResponse,
associateSkillWithUsersResponse_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 AssociateSkillWithUsers = AssociateSkillWithUsers'
{
AssociateSkillWithUsers -> Text
skillId :: Prelude.Text
}
deriving (AssociateSkillWithUsers -> AssociateSkillWithUsers -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateSkillWithUsers -> AssociateSkillWithUsers -> Bool
$c/= :: AssociateSkillWithUsers -> AssociateSkillWithUsers -> Bool
== :: AssociateSkillWithUsers -> AssociateSkillWithUsers -> Bool
$c== :: AssociateSkillWithUsers -> AssociateSkillWithUsers -> Bool
Prelude.Eq, ReadPrec [AssociateSkillWithUsers]
ReadPrec AssociateSkillWithUsers
Int -> ReadS AssociateSkillWithUsers
ReadS [AssociateSkillWithUsers]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateSkillWithUsers]
$creadListPrec :: ReadPrec [AssociateSkillWithUsers]
readPrec :: ReadPrec AssociateSkillWithUsers
$creadPrec :: ReadPrec AssociateSkillWithUsers
readList :: ReadS [AssociateSkillWithUsers]
$creadList :: ReadS [AssociateSkillWithUsers]
readsPrec :: Int -> ReadS AssociateSkillWithUsers
$creadsPrec :: Int -> ReadS AssociateSkillWithUsers
Prelude.Read, Int -> AssociateSkillWithUsers -> ShowS
[AssociateSkillWithUsers] -> ShowS
AssociateSkillWithUsers -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateSkillWithUsers] -> ShowS
$cshowList :: [AssociateSkillWithUsers] -> ShowS
show :: AssociateSkillWithUsers -> String
$cshow :: AssociateSkillWithUsers -> String
showsPrec :: Int -> AssociateSkillWithUsers -> ShowS
$cshowsPrec :: Int -> AssociateSkillWithUsers -> ShowS
Prelude.Show, forall x. Rep AssociateSkillWithUsers x -> AssociateSkillWithUsers
forall x. AssociateSkillWithUsers -> Rep AssociateSkillWithUsers x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep AssociateSkillWithUsers x -> AssociateSkillWithUsers
$cfrom :: forall x. AssociateSkillWithUsers -> Rep AssociateSkillWithUsers x
Prelude.Generic)
newAssociateSkillWithUsers ::
Prelude.Text ->
AssociateSkillWithUsers
newAssociateSkillWithUsers :: Text -> AssociateSkillWithUsers
newAssociateSkillWithUsers Text
pSkillId_ =
AssociateSkillWithUsers' {$sel:skillId:AssociateSkillWithUsers' :: Text
skillId = Text
pSkillId_}
associateSkillWithUsers_skillId :: Lens.Lens' AssociateSkillWithUsers Prelude.Text
associateSkillWithUsers_skillId :: Lens' AssociateSkillWithUsers Text
associateSkillWithUsers_skillId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateSkillWithUsers' {Text
skillId :: Text
$sel:skillId:AssociateSkillWithUsers' :: AssociateSkillWithUsers -> Text
skillId} -> Text
skillId) (\s :: AssociateSkillWithUsers
s@AssociateSkillWithUsers' {} Text
a -> AssociateSkillWithUsers
s {$sel:skillId:AssociateSkillWithUsers' :: Text
skillId = Text
a} :: AssociateSkillWithUsers)
instance Core.AWSRequest AssociateSkillWithUsers where
type
AWSResponse AssociateSkillWithUsers =
AssociateSkillWithUsersResponse
request :: (Service -> Service)
-> AssociateSkillWithUsers -> Request AssociateSkillWithUsers
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 AssociateSkillWithUsers
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse AssociateSkillWithUsers)))
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 -> AssociateSkillWithUsersResponse
AssociateSkillWithUsersResponse'
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 AssociateSkillWithUsers where
hashWithSalt :: Int -> AssociateSkillWithUsers -> Int
hashWithSalt Int
_salt AssociateSkillWithUsers' {Text
skillId :: Text
$sel:skillId:AssociateSkillWithUsers' :: AssociateSkillWithUsers -> Text
..} =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
skillId
instance Prelude.NFData AssociateSkillWithUsers where
rnf :: AssociateSkillWithUsers -> ()
rnf AssociateSkillWithUsers' {Text
skillId :: Text
$sel:skillId:AssociateSkillWithUsers' :: AssociateSkillWithUsers -> Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Text
skillId
instance Data.ToHeaders AssociateSkillWithUsers where
toHeaders :: AssociateSkillWithUsers -> 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.AssociateSkillWithUsers" ::
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 AssociateSkillWithUsers where
toJSON :: AssociateSkillWithUsers -> Value
toJSON AssociateSkillWithUsers' {Text
skillId :: Text
$sel:skillId:AssociateSkillWithUsers' :: AssociateSkillWithUsers -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[forall a. a -> Maybe a
Prelude.Just (Key
"SkillId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
skillId)]
)
instance Data.ToPath AssociateSkillWithUsers where
toPath :: AssociateSkillWithUsers -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery AssociateSkillWithUsers where
toQuery :: AssociateSkillWithUsers -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data AssociateSkillWithUsersResponse = AssociateSkillWithUsersResponse'
{
AssociateSkillWithUsersResponse -> Int
httpStatus :: Prelude.Int
}
deriving (AssociateSkillWithUsersResponse
-> AssociateSkillWithUsersResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AssociateSkillWithUsersResponse
-> AssociateSkillWithUsersResponse -> Bool
$c/= :: AssociateSkillWithUsersResponse
-> AssociateSkillWithUsersResponse -> Bool
== :: AssociateSkillWithUsersResponse
-> AssociateSkillWithUsersResponse -> Bool
$c== :: AssociateSkillWithUsersResponse
-> AssociateSkillWithUsersResponse -> Bool
Prelude.Eq, ReadPrec [AssociateSkillWithUsersResponse]
ReadPrec AssociateSkillWithUsersResponse
Int -> ReadS AssociateSkillWithUsersResponse
ReadS [AssociateSkillWithUsersResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [AssociateSkillWithUsersResponse]
$creadListPrec :: ReadPrec [AssociateSkillWithUsersResponse]
readPrec :: ReadPrec AssociateSkillWithUsersResponse
$creadPrec :: ReadPrec AssociateSkillWithUsersResponse
readList :: ReadS [AssociateSkillWithUsersResponse]
$creadList :: ReadS [AssociateSkillWithUsersResponse]
readsPrec :: Int -> ReadS AssociateSkillWithUsersResponse
$creadsPrec :: Int -> ReadS AssociateSkillWithUsersResponse
Prelude.Read, Int -> AssociateSkillWithUsersResponse -> ShowS
[AssociateSkillWithUsersResponse] -> ShowS
AssociateSkillWithUsersResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [AssociateSkillWithUsersResponse] -> ShowS
$cshowList :: [AssociateSkillWithUsersResponse] -> ShowS
show :: AssociateSkillWithUsersResponse -> String
$cshow :: AssociateSkillWithUsersResponse -> String
showsPrec :: Int -> AssociateSkillWithUsersResponse -> ShowS
$cshowsPrec :: Int -> AssociateSkillWithUsersResponse -> ShowS
Prelude.Show, forall x.
Rep AssociateSkillWithUsersResponse x
-> AssociateSkillWithUsersResponse
forall x.
AssociateSkillWithUsersResponse
-> Rep AssociateSkillWithUsersResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep AssociateSkillWithUsersResponse x
-> AssociateSkillWithUsersResponse
$cfrom :: forall x.
AssociateSkillWithUsersResponse
-> Rep AssociateSkillWithUsersResponse x
Prelude.Generic)
newAssociateSkillWithUsersResponse ::
Prelude.Int ->
AssociateSkillWithUsersResponse
newAssociateSkillWithUsersResponse :: Int -> AssociateSkillWithUsersResponse
newAssociateSkillWithUsersResponse Int
pHttpStatus_ =
AssociateSkillWithUsersResponse'
{ $sel:httpStatus:AssociateSkillWithUsersResponse' :: Int
httpStatus =
Int
pHttpStatus_
}
associateSkillWithUsersResponse_httpStatus :: Lens.Lens' AssociateSkillWithUsersResponse Prelude.Int
associateSkillWithUsersResponse_httpStatus :: Lens' AssociateSkillWithUsersResponse Int
associateSkillWithUsersResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\AssociateSkillWithUsersResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateSkillWithUsersResponse' :: AssociateSkillWithUsersResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: AssociateSkillWithUsersResponse
s@AssociateSkillWithUsersResponse' {} Int
a -> AssociateSkillWithUsersResponse
s {$sel:httpStatus:AssociateSkillWithUsersResponse' :: Int
httpStatus = Int
a} :: AssociateSkillWithUsersResponse)
instance
Prelude.NFData
AssociateSkillWithUsersResponse
where
rnf :: AssociateSkillWithUsersResponse -> ()
rnf AssociateSkillWithUsersResponse' {Int
httpStatus :: Int
$sel:httpStatus:AssociateSkillWithUsersResponse' :: AssociateSkillWithUsersResponse -> Int
..} =
forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus