{-# 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.GetInvitationConfiguration
(
GetInvitationConfiguration (..),
newGetInvitationConfiguration,
GetInvitationConfigurationResponse (..),
newGetInvitationConfigurationResponse,
getInvitationConfigurationResponse_contactEmail,
getInvitationConfigurationResponse_organizationName,
getInvitationConfigurationResponse_privateSkillIds,
getInvitationConfigurationResponse_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 GetInvitationConfiguration = GetInvitationConfiguration'
{
}
deriving (GetInvitationConfiguration -> GetInvitationConfiguration -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInvitationConfiguration -> GetInvitationConfiguration -> Bool
$c/= :: GetInvitationConfiguration -> GetInvitationConfiguration -> Bool
== :: GetInvitationConfiguration -> GetInvitationConfiguration -> Bool
$c== :: GetInvitationConfiguration -> GetInvitationConfiguration -> Bool
Prelude.Eq, ReadPrec [GetInvitationConfiguration]
ReadPrec GetInvitationConfiguration
Int -> ReadS GetInvitationConfiguration
ReadS [GetInvitationConfiguration]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInvitationConfiguration]
$creadListPrec :: ReadPrec [GetInvitationConfiguration]
readPrec :: ReadPrec GetInvitationConfiguration
$creadPrec :: ReadPrec GetInvitationConfiguration
readList :: ReadS [GetInvitationConfiguration]
$creadList :: ReadS [GetInvitationConfiguration]
readsPrec :: Int -> ReadS GetInvitationConfiguration
$creadsPrec :: Int -> ReadS GetInvitationConfiguration
Prelude.Read, Int -> GetInvitationConfiguration -> ShowS
[GetInvitationConfiguration] -> ShowS
GetInvitationConfiguration -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInvitationConfiguration] -> ShowS
$cshowList :: [GetInvitationConfiguration] -> ShowS
show :: GetInvitationConfiguration -> String
$cshow :: GetInvitationConfiguration -> String
showsPrec :: Int -> GetInvitationConfiguration -> ShowS
$cshowsPrec :: Int -> GetInvitationConfiguration -> ShowS
Prelude.Show, forall x.
Rep GetInvitationConfiguration x -> GetInvitationConfiguration
forall x.
GetInvitationConfiguration -> Rep GetInvitationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetInvitationConfiguration x -> GetInvitationConfiguration
$cfrom :: forall x.
GetInvitationConfiguration -> Rep GetInvitationConfiguration x
Prelude.Generic)
newGetInvitationConfiguration ::
GetInvitationConfiguration
newGetInvitationConfiguration :: GetInvitationConfiguration
newGetInvitationConfiguration =
GetInvitationConfiguration
GetInvitationConfiguration'
instance Core.AWSRequest GetInvitationConfiguration where
type
AWSResponse GetInvitationConfiguration =
GetInvitationConfigurationResponse
request :: (Service -> Service)
-> GetInvitationConfiguration -> Request GetInvitationConfiguration
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 GetInvitationConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetInvitationConfiguration)))
response =
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveJSON
( \Int
s ResponseHeaders
h Object
x ->
Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Int
-> GetInvitationConfigurationResponse
GetInvitationConfigurationResponse'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"ContactEmail")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"OrganizationName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"PrivateSkillIds"
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => 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 GetInvitationConfiguration where
hashWithSalt :: Int -> GetInvitationConfiguration -> Int
hashWithSalt Int
_salt GetInvitationConfiguration
_ =
Int
_salt forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ()
instance Prelude.NFData GetInvitationConfiguration where
rnf :: GetInvitationConfiguration -> ()
rnf GetInvitationConfiguration
_ = ()
instance Data.ToHeaders GetInvitationConfiguration where
toHeaders :: GetInvitationConfiguration -> 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.GetInvitationConfiguration" ::
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 GetInvitationConfiguration where
toJSON :: GetInvitationConfiguration -> Value
toJSON = forall a b. a -> b -> a
Prelude.const (Object -> Value
Data.Object forall a. Monoid a => a
Prelude.mempty)
instance Data.ToPath GetInvitationConfiguration where
toPath :: GetInvitationConfiguration -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Data.ToQuery GetInvitationConfiguration where
toQuery :: GetInvitationConfiguration -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data GetInvitationConfigurationResponse = GetInvitationConfigurationResponse'
{
GetInvitationConfigurationResponse -> Maybe Text
contactEmail :: Prelude.Maybe Prelude.Text,
GetInvitationConfigurationResponse -> Maybe Text
organizationName :: Prelude.Maybe Prelude.Text,
GetInvitationConfigurationResponse -> Maybe [Text]
privateSkillIds :: Prelude.Maybe [Prelude.Text],
GetInvitationConfigurationResponse -> Int
httpStatus :: Prelude.Int
}
deriving (GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool
$c/= :: GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool
== :: GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool
$c== :: GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool
Prelude.Eq, ReadPrec [GetInvitationConfigurationResponse]
ReadPrec GetInvitationConfigurationResponse
Int -> ReadS GetInvitationConfigurationResponse
ReadS [GetInvitationConfigurationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetInvitationConfigurationResponse]
$creadListPrec :: ReadPrec [GetInvitationConfigurationResponse]
readPrec :: ReadPrec GetInvitationConfigurationResponse
$creadPrec :: ReadPrec GetInvitationConfigurationResponse
readList :: ReadS [GetInvitationConfigurationResponse]
$creadList :: ReadS [GetInvitationConfigurationResponse]
readsPrec :: Int -> ReadS GetInvitationConfigurationResponse
$creadsPrec :: Int -> ReadS GetInvitationConfigurationResponse
Prelude.Read, Int -> GetInvitationConfigurationResponse -> ShowS
[GetInvitationConfigurationResponse] -> ShowS
GetInvitationConfigurationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetInvitationConfigurationResponse] -> ShowS
$cshowList :: [GetInvitationConfigurationResponse] -> ShowS
show :: GetInvitationConfigurationResponse -> String
$cshow :: GetInvitationConfigurationResponse -> String
showsPrec :: Int -> GetInvitationConfigurationResponse -> ShowS
$cshowsPrec :: Int -> GetInvitationConfigurationResponse -> ShowS
Prelude.Show, forall x.
Rep GetInvitationConfigurationResponse x
-> GetInvitationConfigurationResponse
forall x.
GetInvitationConfigurationResponse
-> Rep GetInvitationConfigurationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetInvitationConfigurationResponse x
-> GetInvitationConfigurationResponse
$cfrom :: forall x.
GetInvitationConfigurationResponse
-> Rep GetInvitationConfigurationResponse x
Prelude.Generic)
newGetInvitationConfigurationResponse ::
Prelude.Int ->
GetInvitationConfigurationResponse
newGetInvitationConfigurationResponse :: Int -> GetInvitationConfigurationResponse
newGetInvitationConfigurationResponse Int
pHttpStatus_ =
GetInvitationConfigurationResponse'
{ $sel:contactEmail:GetInvitationConfigurationResponse' :: Maybe Text
contactEmail =
forall a. Maybe a
Prelude.Nothing,
$sel:organizationName:GetInvitationConfigurationResponse' :: Maybe Text
organizationName = forall a. Maybe a
Prelude.Nothing,
$sel:privateSkillIds:GetInvitationConfigurationResponse' :: Maybe [Text]
privateSkillIds = forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetInvitationConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getInvitationConfigurationResponse_contactEmail :: Lens.Lens' GetInvitationConfigurationResponse (Prelude.Maybe Prelude.Text)
getInvitationConfigurationResponse_contactEmail :: Lens' GetInvitationConfigurationResponse (Maybe Text)
getInvitationConfigurationResponse_contactEmail = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInvitationConfigurationResponse' {Maybe Text
contactEmail :: Maybe Text
$sel:contactEmail:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe Text
contactEmail} -> Maybe Text
contactEmail) (\s :: GetInvitationConfigurationResponse
s@GetInvitationConfigurationResponse' {} Maybe Text
a -> GetInvitationConfigurationResponse
s {$sel:contactEmail:GetInvitationConfigurationResponse' :: Maybe Text
contactEmail = Maybe Text
a} :: GetInvitationConfigurationResponse)
getInvitationConfigurationResponse_organizationName :: Lens.Lens' GetInvitationConfigurationResponse (Prelude.Maybe Prelude.Text)
getInvitationConfigurationResponse_organizationName :: Lens' GetInvitationConfigurationResponse (Maybe Text)
getInvitationConfigurationResponse_organizationName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInvitationConfigurationResponse' {Maybe Text
organizationName :: Maybe Text
$sel:organizationName:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe Text
organizationName} -> Maybe Text
organizationName) (\s :: GetInvitationConfigurationResponse
s@GetInvitationConfigurationResponse' {} Maybe Text
a -> GetInvitationConfigurationResponse
s {$sel:organizationName:GetInvitationConfigurationResponse' :: Maybe Text
organizationName = Maybe Text
a} :: GetInvitationConfigurationResponse)
getInvitationConfigurationResponse_privateSkillIds :: Lens.Lens' GetInvitationConfigurationResponse (Prelude.Maybe [Prelude.Text])
getInvitationConfigurationResponse_privateSkillIds :: Lens' GetInvitationConfigurationResponse (Maybe [Text])
getInvitationConfigurationResponse_privateSkillIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInvitationConfigurationResponse' {Maybe [Text]
privateSkillIds :: Maybe [Text]
$sel:privateSkillIds:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe [Text]
privateSkillIds} -> Maybe [Text]
privateSkillIds) (\s :: GetInvitationConfigurationResponse
s@GetInvitationConfigurationResponse' {} Maybe [Text]
a -> GetInvitationConfigurationResponse
s {$sel:privateSkillIds:GetInvitationConfigurationResponse' :: Maybe [Text]
privateSkillIds = Maybe [Text]
a} :: GetInvitationConfigurationResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
getInvitationConfigurationResponse_httpStatus :: Lens.Lens' GetInvitationConfigurationResponse Prelude.Int
getInvitationConfigurationResponse_httpStatus :: Lens' GetInvitationConfigurationResponse Int
getInvitationConfigurationResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetInvitationConfigurationResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetInvitationConfigurationResponse
s@GetInvitationConfigurationResponse' {} Int
a -> GetInvitationConfigurationResponse
s {$sel:httpStatus:GetInvitationConfigurationResponse' :: Int
httpStatus = Int
a} :: GetInvitationConfigurationResponse)
instance
Prelude.NFData
GetInvitationConfigurationResponse
where
rnf :: GetInvitationConfigurationResponse -> ()
rnf GetInvitationConfigurationResponse' {Int
Maybe [Text]
Maybe Text
httpStatus :: Int
privateSkillIds :: Maybe [Text]
organizationName :: Maybe Text
contactEmail :: Maybe Text
$sel:httpStatus:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Int
$sel:privateSkillIds:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe [Text]
$sel:organizationName:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe Text
$sel:contactEmail:GetInvitationConfigurationResponse' :: GetInvitationConfigurationResponse -> Maybe Text
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
contactEmail
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
organizationName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
privateSkillIds
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus