{-# 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.Lens as Lens
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
(GetInvitationConfiguration -> GetInvitationConfiguration -> Bool)
-> (GetInvitationConfiguration
-> GetInvitationConfiguration -> Bool)
-> Eq GetInvitationConfiguration
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]
(Int -> ReadS GetInvitationConfiguration)
-> ReadS [GetInvitationConfiguration]
-> ReadPrec GetInvitationConfiguration
-> ReadPrec [GetInvitationConfiguration]
-> Read 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
(Int -> GetInvitationConfiguration -> ShowS)
-> (GetInvitationConfiguration -> String)
-> ([GetInvitationConfiguration] -> ShowS)
-> Show GetInvitationConfiguration
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.
GetInvitationConfiguration -> Rep GetInvitationConfiguration x)
-> (forall x.
Rep GetInvitationConfiguration x -> GetInvitationConfiguration)
-> Generic GetInvitationConfiguration
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 :: GetInvitationConfiguration -> Request GetInvitationConfiguration
request = Service
-> GetInvitationConfiguration -> Request GetInvitationConfiguration
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GetInvitationConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetInvitationConfiguration)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GetInvitationConfiguration))
-> Logger
-> Service
-> Proxy GetInvitationConfiguration
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse GetInvitationConfiguration)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> Object -> Either String (AWSResponse a))
-> Logger
-> 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'
(Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Int
-> GetInvitationConfigurationResponse)
-> Either String (Maybe Text)
-> Either
String
(Maybe Text
-> Maybe [Text] -> Int -> GetInvitationConfigurationResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ContactEmail")
Either
String
(Maybe Text
-> Maybe [Text] -> Int -> GetInvitationConfigurationResponse)
-> Either String (Maybe Text)
-> Either
String (Maybe [Text] -> Int -> GetInvitationConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Text)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"OrganizationName")
Either
String (Maybe [Text] -> Int -> GetInvitationConfigurationResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> GetInvitationConfigurationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"PrivateSkillIds"
Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty
)
Either String (Int -> GetInvitationConfigurationResponse)
-> Either String Int
-> Either String GetInvitationConfigurationResponse
forall (f :: * -> *) a b. Applicative f => 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 GetInvitationConfiguration
instance Prelude.NFData GetInvitationConfiguration
instance Core.ToHeaders GetInvitationConfiguration where
toHeaders :: GetInvitationConfiguration -> ResponseHeaders
toHeaders =
ResponseHeaders -> GetInvitationConfiguration -> 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.GetInvitationConfiguration" ::
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 GetInvitationConfiguration where
toJSON :: GetInvitationConfiguration -> Value
toJSON = Value -> GetInvitationConfiguration -> Value
forall a b. a -> b -> a
Prelude.const (Object -> Value
Core.Object Object
forall a. Monoid a => a
Prelude.mempty)
instance Core.ToPath GetInvitationConfiguration where
toPath :: GetInvitationConfiguration -> ByteString
toPath = ByteString -> GetInvitationConfiguration -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"
instance Core.ToQuery GetInvitationConfiguration where
toQuery :: GetInvitationConfiguration -> QueryString
toQuery = QueryString -> GetInvitationConfiguration -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
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
(GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool)
-> (GetInvitationConfigurationResponse
-> GetInvitationConfigurationResponse -> Bool)
-> Eq GetInvitationConfigurationResponse
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]
(Int -> ReadS GetInvitationConfigurationResponse)
-> ReadS [GetInvitationConfigurationResponse]
-> ReadPrec GetInvitationConfigurationResponse
-> ReadPrec [GetInvitationConfigurationResponse]
-> Read 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
(Int -> GetInvitationConfigurationResponse -> ShowS)
-> (GetInvitationConfigurationResponse -> String)
-> ([GetInvitationConfigurationResponse] -> ShowS)
-> Show GetInvitationConfigurationResponse
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.
GetInvitationConfigurationResponse
-> Rep GetInvitationConfigurationResponse x)
-> (forall x.
Rep GetInvitationConfigurationResponse x
-> GetInvitationConfigurationResponse)
-> Generic GetInvitationConfigurationResponse
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' :: Maybe Text
-> Maybe Text
-> Maybe [Text]
-> Int
-> GetInvitationConfigurationResponse
GetInvitationConfigurationResponse'
{ $sel:contactEmail:GetInvitationConfigurationResponse' :: Maybe Text
contactEmail =
Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:organizationName:GetInvitationConfigurationResponse' :: Maybe Text
organizationName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:privateSkillIds:GetInvitationConfigurationResponse' :: Maybe [Text]
privateSkillIds = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
$sel:httpStatus:GetInvitationConfigurationResponse' :: Int
httpStatus = Int
pHttpStatus_
}
getInvitationConfigurationResponse_contactEmail :: Lens.Lens' GetInvitationConfigurationResponse (Prelude.Maybe Prelude.Text)
getInvitationConfigurationResponse_contactEmail :: (Maybe Text -> f (Maybe Text))
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse
getInvitationConfigurationResponse_contactEmail = (GetInvitationConfigurationResponse -> Maybe Text)
-> (GetInvitationConfigurationResponse
-> Maybe Text -> GetInvitationConfigurationResponse)
-> Lens
GetInvitationConfigurationResponse
GetInvitationConfigurationResponse
(Maybe Text)
(Maybe Text)
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 :: (Maybe Text -> f (Maybe Text))
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse
getInvitationConfigurationResponse_organizationName = (GetInvitationConfigurationResponse -> Maybe Text)
-> (GetInvitationConfigurationResponse
-> Maybe Text -> GetInvitationConfigurationResponse)
-> Lens
GetInvitationConfigurationResponse
GetInvitationConfigurationResponse
(Maybe Text)
(Maybe Text)
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 :: (Maybe [Text] -> f (Maybe [Text]))
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse
getInvitationConfigurationResponse_privateSkillIds = (GetInvitationConfigurationResponse -> Maybe [Text])
-> (GetInvitationConfigurationResponse
-> Maybe [Text] -> GetInvitationConfigurationResponse)
-> Lens
GetInvitationConfigurationResponse
GetInvitationConfigurationResponse
(Maybe [Text])
(Maybe [Text])
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) ((Maybe [Text] -> f (Maybe [Text]))
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
-> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
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 AnIso [Text] [Text] [Text] [Text]
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 :: (Int -> f Int)
-> GetInvitationConfigurationResponse
-> f GetInvitationConfigurationResponse
getInvitationConfigurationResponse_httpStatus = (GetInvitationConfigurationResponse -> Int)
-> (GetInvitationConfigurationResponse
-> Int -> GetInvitationConfigurationResponse)
-> Lens
GetInvitationConfigurationResponse
GetInvitationConfigurationResponse
Int
Int
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