{-# 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.QuickSight.GenerateEmbedUrlForAnonymousUser
(
GenerateEmbedUrlForAnonymousUser (..),
newGenerateEmbedUrlForAnonymousUser,
generateEmbedUrlForAnonymousUser_sessionLifetimeInMinutes,
generateEmbedUrlForAnonymousUser_sessionTags,
generateEmbedUrlForAnonymousUser_awsAccountId,
generateEmbedUrlForAnonymousUser_namespace,
generateEmbedUrlForAnonymousUser_authorizedResourceArns,
generateEmbedUrlForAnonymousUser_experienceConfiguration,
GenerateEmbedUrlForAnonymousUserResponse (..),
newGenerateEmbedUrlForAnonymousUserResponse,
generateEmbedUrlForAnonymousUserResponse_status,
generateEmbedUrlForAnonymousUserResponse_embedUrl,
generateEmbedUrlForAnonymousUserResponse_requestId,
)
where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import Amazonka.QuickSight.Types
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response
data GenerateEmbedUrlForAnonymousUser = GenerateEmbedUrlForAnonymousUser'
{
GenerateEmbedUrlForAnonymousUser -> Maybe Natural
sessionLifetimeInMinutes :: Prelude.Maybe Prelude.Natural,
GenerateEmbedUrlForAnonymousUser -> Maybe (NonEmpty SessionTag)
sessionTags :: Prelude.Maybe (Prelude.NonEmpty SessionTag),
GenerateEmbedUrlForAnonymousUser -> Text
awsAccountId :: Prelude.Text,
GenerateEmbedUrlForAnonymousUser -> Text
namespace :: Prelude.Text,
GenerateEmbedUrlForAnonymousUser -> [Text]
authorizedResourceArns :: [Prelude.Text],
GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration :: AnonymousUserEmbeddingExperienceConfiguration
}
deriving (GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool
(GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool)
-> (GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool)
-> Eq GenerateEmbedUrlForAnonymousUser
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool
$c/= :: GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool
== :: GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool
$c== :: GenerateEmbedUrlForAnonymousUser
-> GenerateEmbedUrlForAnonymousUser -> Bool
Prelude.Eq, Int -> GenerateEmbedUrlForAnonymousUser -> ShowS
[GenerateEmbedUrlForAnonymousUser] -> ShowS
GenerateEmbedUrlForAnonymousUser -> String
(Int -> GenerateEmbedUrlForAnonymousUser -> ShowS)
-> (GenerateEmbedUrlForAnonymousUser -> String)
-> ([GenerateEmbedUrlForAnonymousUser] -> ShowS)
-> Show GenerateEmbedUrlForAnonymousUser
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenerateEmbedUrlForAnonymousUser] -> ShowS
$cshowList :: [GenerateEmbedUrlForAnonymousUser] -> ShowS
show :: GenerateEmbedUrlForAnonymousUser -> String
$cshow :: GenerateEmbedUrlForAnonymousUser -> String
showsPrec :: Int -> GenerateEmbedUrlForAnonymousUser -> ShowS
$cshowsPrec :: Int -> GenerateEmbedUrlForAnonymousUser -> ShowS
Prelude.Show, (forall x.
GenerateEmbedUrlForAnonymousUser
-> Rep GenerateEmbedUrlForAnonymousUser x)
-> (forall x.
Rep GenerateEmbedUrlForAnonymousUser x
-> GenerateEmbedUrlForAnonymousUser)
-> Generic GenerateEmbedUrlForAnonymousUser
forall x.
Rep GenerateEmbedUrlForAnonymousUser x
-> GenerateEmbedUrlForAnonymousUser
forall x.
GenerateEmbedUrlForAnonymousUser
-> Rep GenerateEmbedUrlForAnonymousUser x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GenerateEmbedUrlForAnonymousUser x
-> GenerateEmbedUrlForAnonymousUser
$cfrom :: forall x.
GenerateEmbedUrlForAnonymousUser
-> Rep GenerateEmbedUrlForAnonymousUser x
Prelude.Generic)
newGenerateEmbedUrlForAnonymousUser ::
Prelude.Text ->
Prelude.Text ->
AnonymousUserEmbeddingExperienceConfiguration ->
GenerateEmbedUrlForAnonymousUser
newGenerateEmbedUrlForAnonymousUser :: Text
-> Text
-> AnonymousUserEmbeddingExperienceConfiguration
-> GenerateEmbedUrlForAnonymousUser
newGenerateEmbedUrlForAnonymousUser
Text
pAwsAccountId_
Text
pNamespace_
AnonymousUserEmbeddingExperienceConfiguration
pExperienceConfiguration_ =
GenerateEmbedUrlForAnonymousUser' :: Maybe Natural
-> Maybe (NonEmpty SessionTag)
-> Text
-> Text
-> [Text]
-> AnonymousUserEmbeddingExperienceConfiguration
-> GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser'
{ $sel:sessionLifetimeInMinutes:GenerateEmbedUrlForAnonymousUser' :: Maybe Natural
sessionLifetimeInMinutes =
Maybe Natural
forall a. Maybe a
Prelude.Nothing,
$sel:sessionTags:GenerateEmbedUrlForAnonymousUser' :: Maybe (NonEmpty SessionTag)
sessionTags = Maybe (NonEmpty SessionTag)
forall a. Maybe a
Prelude.Nothing,
$sel:awsAccountId:GenerateEmbedUrlForAnonymousUser' :: Text
awsAccountId = Text
pAwsAccountId_,
$sel:namespace:GenerateEmbedUrlForAnonymousUser' :: Text
namespace = Text
pNamespace_,
$sel:authorizedResourceArns:GenerateEmbedUrlForAnonymousUser' :: [Text]
authorizedResourceArns = [Text]
forall a. Monoid a => a
Prelude.mempty,
$sel:experienceConfiguration:GenerateEmbedUrlForAnonymousUser' :: AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration =
AnonymousUserEmbeddingExperienceConfiguration
pExperienceConfiguration_
}
generateEmbedUrlForAnonymousUser_sessionLifetimeInMinutes :: Lens.Lens' GenerateEmbedUrlForAnonymousUser (Prelude.Maybe Prelude.Natural)
generateEmbedUrlForAnonymousUser_sessionLifetimeInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_sessionLifetimeInMinutes = (GenerateEmbedUrlForAnonymousUser -> Maybe Natural)
-> (GenerateEmbedUrlForAnonymousUser
-> Maybe Natural -> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
(Maybe Natural)
(Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {Maybe Natural
sessionLifetimeInMinutes :: Maybe Natural
$sel:sessionLifetimeInMinutes:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe Natural
sessionLifetimeInMinutes} -> Maybe Natural
sessionLifetimeInMinutes) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} Maybe Natural
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:sessionLifetimeInMinutes:GenerateEmbedUrlForAnonymousUser' :: Maybe Natural
sessionLifetimeInMinutes = Maybe Natural
a} :: GenerateEmbedUrlForAnonymousUser)
generateEmbedUrlForAnonymousUser_sessionTags :: Lens.Lens' GenerateEmbedUrlForAnonymousUser (Prelude.Maybe (Prelude.NonEmpty SessionTag))
generateEmbedUrlForAnonymousUser_sessionTags :: (Maybe (NonEmpty SessionTag) -> f (Maybe (NonEmpty SessionTag)))
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_sessionTags = (GenerateEmbedUrlForAnonymousUser -> Maybe (NonEmpty SessionTag))
-> (GenerateEmbedUrlForAnonymousUser
-> Maybe (NonEmpty SessionTag) -> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
(Maybe (NonEmpty SessionTag))
(Maybe (NonEmpty SessionTag))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {Maybe (NonEmpty SessionTag)
sessionTags :: Maybe (NonEmpty SessionTag)
$sel:sessionTags:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe (NonEmpty SessionTag)
sessionTags} -> Maybe (NonEmpty SessionTag)
sessionTags) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} Maybe (NonEmpty SessionTag)
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:sessionTags:GenerateEmbedUrlForAnonymousUser' :: Maybe (NonEmpty SessionTag)
sessionTags = Maybe (NonEmpty SessionTag)
a} :: GenerateEmbedUrlForAnonymousUser) ((Maybe (NonEmpty SessionTag) -> f (Maybe (NonEmpty SessionTag)))
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser)
-> ((Maybe (NonEmpty SessionTag)
-> f (Maybe (NonEmpty SessionTag)))
-> Maybe (NonEmpty SessionTag) -> f (Maybe (NonEmpty SessionTag)))
-> (Maybe (NonEmpty SessionTag) -> f (Maybe (NonEmpty SessionTag)))
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(NonEmpty SessionTag)
(NonEmpty SessionTag)
(NonEmpty SessionTag)
(NonEmpty SessionTag)
-> Iso
(Maybe (NonEmpty SessionTag))
(Maybe (NonEmpty SessionTag))
(Maybe (NonEmpty SessionTag))
(Maybe (NonEmpty SessionTag))
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
(NonEmpty SessionTag)
(NonEmpty SessionTag)
(NonEmpty SessionTag)
(NonEmpty SessionTag)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
generateEmbedUrlForAnonymousUser_awsAccountId :: Lens.Lens' GenerateEmbedUrlForAnonymousUser Prelude.Text
generateEmbedUrlForAnonymousUser_awsAccountId :: (Text -> f Text)
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_awsAccountId = (GenerateEmbedUrlForAnonymousUser -> Text)
-> (GenerateEmbedUrlForAnonymousUser
-> Text -> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {Text
awsAccountId :: Text
$sel:awsAccountId:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
awsAccountId} -> Text
awsAccountId) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} Text
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:awsAccountId:GenerateEmbedUrlForAnonymousUser' :: Text
awsAccountId = Text
a} :: GenerateEmbedUrlForAnonymousUser)
generateEmbedUrlForAnonymousUser_namespace :: Lens.Lens' GenerateEmbedUrlForAnonymousUser Prelude.Text
generateEmbedUrlForAnonymousUser_namespace :: (Text -> f Text)
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_namespace = (GenerateEmbedUrlForAnonymousUser -> Text)
-> (GenerateEmbedUrlForAnonymousUser
-> Text -> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {Text
namespace :: Text
$sel:namespace:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
namespace} -> Text
namespace) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} Text
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:namespace:GenerateEmbedUrlForAnonymousUser' :: Text
namespace = Text
a} :: GenerateEmbedUrlForAnonymousUser)
generateEmbedUrlForAnonymousUser_authorizedResourceArns :: Lens.Lens' GenerateEmbedUrlForAnonymousUser [Prelude.Text]
generateEmbedUrlForAnonymousUser_authorizedResourceArns :: ([Text] -> f [Text])
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_authorizedResourceArns = (GenerateEmbedUrlForAnonymousUser -> [Text])
-> (GenerateEmbedUrlForAnonymousUser
-> [Text] -> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
[Text]
[Text]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {[Text]
authorizedResourceArns :: [Text]
$sel:authorizedResourceArns:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> [Text]
authorizedResourceArns} -> [Text]
authorizedResourceArns) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} [Text]
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:authorizedResourceArns:GenerateEmbedUrlForAnonymousUser' :: [Text]
authorizedResourceArns = [Text]
a} :: GenerateEmbedUrlForAnonymousUser) (([Text] -> f [Text])
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser)
-> (([Text] -> f [Text]) -> [Text] -> f [Text])
-> ([Text] -> f [Text])
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([Text] -> f [Text]) -> [Text] -> f [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
generateEmbedUrlForAnonymousUser_experienceConfiguration :: Lens.Lens' GenerateEmbedUrlForAnonymousUser AnonymousUserEmbeddingExperienceConfiguration
generateEmbedUrlForAnonymousUser_experienceConfiguration :: (AnonymousUserEmbeddingExperienceConfiguration
-> f AnonymousUserEmbeddingExperienceConfiguration)
-> GenerateEmbedUrlForAnonymousUser
-> f GenerateEmbedUrlForAnonymousUser
generateEmbedUrlForAnonymousUser_experienceConfiguration = (GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration)
-> (GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration
-> GenerateEmbedUrlForAnonymousUser)
-> Lens
GenerateEmbedUrlForAnonymousUser
GenerateEmbedUrlForAnonymousUser
AnonymousUserEmbeddingExperienceConfiguration
AnonymousUserEmbeddingExperienceConfiguration
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUser' {AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration :: AnonymousUserEmbeddingExperienceConfiguration
$sel:experienceConfiguration:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration} -> AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration) (\s :: GenerateEmbedUrlForAnonymousUser
s@GenerateEmbedUrlForAnonymousUser' {} AnonymousUserEmbeddingExperienceConfiguration
a -> GenerateEmbedUrlForAnonymousUser
s {$sel:experienceConfiguration:GenerateEmbedUrlForAnonymousUser' :: AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration = AnonymousUserEmbeddingExperienceConfiguration
a} :: GenerateEmbedUrlForAnonymousUser)
instance
Core.AWSRequest
GenerateEmbedUrlForAnonymousUser
where
type
AWSResponse GenerateEmbedUrlForAnonymousUser =
GenerateEmbedUrlForAnonymousUserResponse
request :: GenerateEmbedUrlForAnonymousUser
-> Request GenerateEmbedUrlForAnonymousUser
request = Service
-> GenerateEmbedUrlForAnonymousUser
-> Request GenerateEmbedUrlForAnonymousUser
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy GenerateEmbedUrlForAnonymousUser
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GenerateEmbedUrlForAnonymousUser)))
response =
(Int
-> ResponseHeaders
-> Object
-> Either String (AWSResponse GenerateEmbedUrlForAnonymousUser))
-> Logger
-> Service
-> Proxy GenerateEmbedUrlForAnonymousUser
-> ClientResponse ClientBody
-> m (Either
Error
(ClientResponse (AWSResponse GenerateEmbedUrlForAnonymousUser)))
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 ->
Int
-> Sensitive Text
-> Text
-> GenerateEmbedUrlForAnonymousUserResponse
GenerateEmbedUrlForAnonymousUserResponse'
(Int
-> Sensitive Text
-> Text
-> GenerateEmbedUrlForAnonymousUserResponse)
-> Either String Int
-> Either
String
(Sensitive Text
-> Text -> GenerateEmbedUrlForAnonymousUserResponse)
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))
Either
String
(Sensitive Text
-> Text -> GenerateEmbedUrlForAnonymousUserResponse)
-> Either String (Sensitive Text)
-> Either String (Text -> GenerateEmbedUrlForAnonymousUserResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Sensitive Text)
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"EmbedUrl")
Either String (Text -> GenerateEmbedUrlForAnonymousUserResponse)
-> Either String Text
-> Either String GenerateEmbedUrlForAnonymousUserResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String Text
forall a. FromJSON a => Object -> Text -> Either String a
Core..:> Text
"RequestId")
)
instance
Prelude.Hashable
GenerateEmbedUrlForAnonymousUser
instance
Prelude.NFData
GenerateEmbedUrlForAnonymousUser
instance
Core.ToHeaders
GenerateEmbedUrlForAnonymousUser
where
toHeaders :: GenerateEmbedUrlForAnonymousUser -> ResponseHeaders
toHeaders =
ResponseHeaders
-> GenerateEmbedUrlForAnonymousUser -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ HeaderName
"Content-Type"
HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# ( ByteString
"application/x-amz-json-1.0" ::
Prelude.ByteString
)
]
)
instance Core.ToJSON GenerateEmbedUrlForAnonymousUser where
toJSON :: GenerateEmbedUrlForAnonymousUser -> Value
toJSON GenerateEmbedUrlForAnonymousUser' {[Text]
Maybe Natural
Maybe (NonEmpty SessionTag)
Text
AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration :: AnonymousUserEmbeddingExperienceConfiguration
authorizedResourceArns :: [Text]
namespace :: Text
awsAccountId :: Text
sessionTags :: Maybe (NonEmpty SessionTag)
sessionLifetimeInMinutes :: Maybe Natural
$sel:experienceConfiguration:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration
$sel:authorizedResourceArns:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> [Text]
$sel:namespace:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
$sel:awsAccountId:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
$sel:sessionTags:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe (NonEmpty SessionTag)
$sel:sessionLifetimeInMinutes:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe Natural
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"SessionLifetimeInMinutes" Text -> Natural -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=)
(Natural -> Pair) -> Maybe Natural -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Natural
sessionLifetimeInMinutes,
(Text
"SessionTags" Text -> NonEmpty SessionTag -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (NonEmpty SessionTag -> Pair)
-> Maybe (NonEmpty SessionTag) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (NonEmpty SessionTag)
sessionTags,
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"Namespace" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
namespace),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"AuthorizedResourceArns"
Text -> [Text] -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= [Text]
authorizedResourceArns
),
Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
( Text
"ExperienceConfiguration"
Text -> AnonymousUserEmbeddingExperienceConfiguration -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration
)
]
)
instance Core.ToPath GenerateEmbedUrlForAnonymousUser where
toPath :: GenerateEmbedUrlForAnonymousUser -> ByteString
toPath GenerateEmbedUrlForAnonymousUser' {[Text]
Maybe Natural
Maybe (NonEmpty SessionTag)
Text
AnonymousUserEmbeddingExperienceConfiguration
experienceConfiguration :: AnonymousUserEmbeddingExperienceConfiguration
authorizedResourceArns :: [Text]
namespace :: Text
awsAccountId :: Text
sessionTags :: Maybe (NonEmpty SessionTag)
sessionLifetimeInMinutes :: Maybe Natural
$sel:experienceConfiguration:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser
-> AnonymousUserEmbeddingExperienceConfiguration
$sel:authorizedResourceArns:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> [Text]
$sel:namespace:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
$sel:awsAccountId:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Text
$sel:sessionTags:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe (NonEmpty SessionTag)
$sel:sessionLifetimeInMinutes:GenerateEmbedUrlForAnonymousUser' :: GenerateEmbedUrlForAnonymousUser -> Maybe Natural
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/accounts/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
awsAccountId,
ByteString
"/embed-url/anonymous-user"
]
instance
Core.ToQuery
GenerateEmbedUrlForAnonymousUser
where
toQuery :: GenerateEmbedUrlForAnonymousUser -> QueryString
toQuery = QueryString -> GenerateEmbedUrlForAnonymousUser -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data GenerateEmbedUrlForAnonymousUserResponse = GenerateEmbedUrlForAnonymousUserResponse'
{
GenerateEmbedUrlForAnonymousUserResponse -> Int
status :: Prelude.Int,
GenerateEmbedUrlForAnonymousUserResponse -> Sensitive Text
embedUrl :: Core.Sensitive Prelude.Text,
GenerateEmbedUrlForAnonymousUserResponse -> Text
requestId :: Prelude.Text
}
deriving (GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool
(GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool)
-> (GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool)
-> Eq GenerateEmbedUrlForAnonymousUserResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool
$c/= :: GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool
== :: GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool
$c== :: GenerateEmbedUrlForAnonymousUserResponse
-> GenerateEmbedUrlForAnonymousUserResponse -> Bool
Prelude.Eq, Int -> GenerateEmbedUrlForAnonymousUserResponse -> ShowS
[GenerateEmbedUrlForAnonymousUserResponse] -> ShowS
GenerateEmbedUrlForAnonymousUserResponse -> String
(Int -> GenerateEmbedUrlForAnonymousUserResponse -> ShowS)
-> (GenerateEmbedUrlForAnonymousUserResponse -> String)
-> ([GenerateEmbedUrlForAnonymousUserResponse] -> ShowS)
-> Show GenerateEmbedUrlForAnonymousUserResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GenerateEmbedUrlForAnonymousUserResponse] -> ShowS
$cshowList :: [GenerateEmbedUrlForAnonymousUserResponse] -> ShowS
show :: GenerateEmbedUrlForAnonymousUserResponse -> String
$cshow :: GenerateEmbedUrlForAnonymousUserResponse -> String
showsPrec :: Int -> GenerateEmbedUrlForAnonymousUserResponse -> ShowS
$cshowsPrec :: Int -> GenerateEmbedUrlForAnonymousUserResponse -> ShowS
Prelude.Show, (forall x.
GenerateEmbedUrlForAnonymousUserResponse
-> Rep GenerateEmbedUrlForAnonymousUserResponse x)
-> (forall x.
Rep GenerateEmbedUrlForAnonymousUserResponse x
-> GenerateEmbedUrlForAnonymousUserResponse)
-> Generic GenerateEmbedUrlForAnonymousUserResponse
forall x.
Rep GenerateEmbedUrlForAnonymousUserResponse x
-> GenerateEmbedUrlForAnonymousUserResponse
forall x.
GenerateEmbedUrlForAnonymousUserResponse
-> Rep GenerateEmbedUrlForAnonymousUserResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GenerateEmbedUrlForAnonymousUserResponse x
-> GenerateEmbedUrlForAnonymousUserResponse
$cfrom :: forall x.
GenerateEmbedUrlForAnonymousUserResponse
-> Rep GenerateEmbedUrlForAnonymousUserResponse x
Prelude.Generic)
newGenerateEmbedUrlForAnonymousUserResponse ::
Prelude.Int ->
Prelude.Text ->
Prelude.Text ->
GenerateEmbedUrlForAnonymousUserResponse
newGenerateEmbedUrlForAnonymousUserResponse :: Int -> Text -> Text -> GenerateEmbedUrlForAnonymousUserResponse
newGenerateEmbedUrlForAnonymousUserResponse
Int
pStatus_
Text
pEmbedUrl_
Text
pRequestId_ =
GenerateEmbedUrlForAnonymousUserResponse' :: Int
-> Sensitive Text
-> Text
-> GenerateEmbedUrlForAnonymousUserResponse
GenerateEmbedUrlForAnonymousUserResponse'
{ $sel:status:GenerateEmbedUrlForAnonymousUserResponse' :: Int
status =
Int
pStatus_,
$sel:embedUrl:GenerateEmbedUrlForAnonymousUserResponse' :: Sensitive Text
embedUrl =
Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text))
forall a. Iso' (Sensitive a) a
Core._Sensitive
(Tagged Text (Identity Text)
-> Tagged (Sensitive Text) (Identity (Sensitive Text)))
-> Text -> Sensitive Text
forall t b. AReview t b -> b -> t
Lens.# Text
pEmbedUrl_,
$sel:requestId:GenerateEmbedUrlForAnonymousUserResponse' :: Text
requestId = Text
pRequestId_
}
generateEmbedUrlForAnonymousUserResponse_status :: Lens.Lens' GenerateEmbedUrlForAnonymousUserResponse Prelude.Int
generateEmbedUrlForAnonymousUserResponse_status :: (Int -> f Int)
-> GenerateEmbedUrlForAnonymousUserResponse
-> f GenerateEmbedUrlForAnonymousUserResponse
generateEmbedUrlForAnonymousUserResponse_status = (GenerateEmbedUrlForAnonymousUserResponse -> Int)
-> (GenerateEmbedUrlForAnonymousUserResponse
-> Int -> GenerateEmbedUrlForAnonymousUserResponse)
-> Lens
GenerateEmbedUrlForAnonymousUserResponse
GenerateEmbedUrlForAnonymousUserResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUserResponse' {Int
status :: Int
$sel:status:GenerateEmbedUrlForAnonymousUserResponse' :: GenerateEmbedUrlForAnonymousUserResponse -> Int
status} -> Int
status) (\s :: GenerateEmbedUrlForAnonymousUserResponse
s@GenerateEmbedUrlForAnonymousUserResponse' {} Int
a -> GenerateEmbedUrlForAnonymousUserResponse
s {$sel:status:GenerateEmbedUrlForAnonymousUserResponse' :: Int
status = Int
a} :: GenerateEmbedUrlForAnonymousUserResponse)
generateEmbedUrlForAnonymousUserResponse_embedUrl :: Lens.Lens' GenerateEmbedUrlForAnonymousUserResponse Prelude.Text
generateEmbedUrlForAnonymousUserResponse_embedUrl :: (Text -> f Text)
-> GenerateEmbedUrlForAnonymousUserResponse
-> f GenerateEmbedUrlForAnonymousUserResponse
generateEmbedUrlForAnonymousUserResponse_embedUrl = (GenerateEmbedUrlForAnonymousUserResponse -> Sensitive Text)
-> (GenerateEmbedUrlForAnonymousUserResponse
-> Sensitive Text -> GenerateEmbedUrlForAnonymousUserResponse)
-> Lens
GenerateEmbedUrlForAnonymousUserResponse
GenerateEmbedUrlForAnonymousUserResponse
(Sensitive Text)
(Sensitive Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUserResponse' {Sensitive Text
embedUrl :: Sensitive Text
$sel:embedUrl:GenerateEmbedUrlForAnonymousUserResponse' :: GenerateEmbedUrlForAnonymousUserResponse -> Sensitive Text
embedUrl} -> Sensitive Text
embedUrl) (\s :: GenerateEmbedUrlForAnonymousUserResponse
s@GenerateEmbedUrlForAnonymousUserResponse' {} Sensitive Text
a -> GenerateEmbedUrlForAnonymousUserResponse
s {$sel:embedUrl:GenerateEmbedUrlForAnonymousUserResponse' :: Sensitive Text
embedUrl = Sensitive Text
a} :: GenerateEmbedUrlForAnonymousUserResponse) ((Sensitive Text -> f (Sensitive Text))
-> GenerateEmbedUrlForAnonymousUserResponse
-> f GenerateEmbedUrlForAnonymousUserResponse)
-> ((Text -> f Text) -> Sensitive Text -> f (Sensitive Text))
-> (Text -> f Text)
-> GenerateEmbedUrlForAnonymousUserResponse
-> f GenerateEmbedUrlForAnonymousUserResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> f Text) -> Sensitive Text -> f (Sensitive Text)
forall a. Iso' (Sensitive a) a
Core._Sensitive
generateEmbedUrlForAnonymousUserResponse_requestId :: Lens.Lens' GenerateEmbedUrlForAnonymousUserResponse Prelude.Text
generateEmbedUrlForAnonymousUserResponse_requestId :: (Text -> f Text)
-> GenerateEmbedUrlForAnonymousUserResponse
-> f GenerateEmbedUrlForAnonymousUserResponse
generateEmbedUrlForAnonymousUserResponse_requestId = (GenerateEmbedUrlForAnonymousUserResponse -> Text)
-> (GenerateEmbedUrlForAnonymousUserResponse
-> Text -> GenerateEmbedUrlForAnonymousUserResponse)
-> Lens
GenerateEmbedUrlForAnonymousUserResponse
GenerateEmbedUrlForAnonymousUserResponse
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GenerateEmbedUrlForAnonymousUserResponse' {Text
requestId :: Text
$sel:requestId:GenerateEmbedUrlForAnonymousUserResponse' :: GenerateEmbedUrlForAnonymousUserResponse -> Text
requestId} -> Text
requestId) (\s :: GenerateEmbedUrlForAnonymousUserResponse
s@GenerateEmbedUrlForAnonymousUserResponse' {} Text
a -> GenerateEmbedUrlForAnonymousUserResponse
s {$sel:requestId:GenerateEmbedUrlForAnonymousUserResponse' :: Text
requestId = Text
a} :: GenerateEmbedUrlForAnonymousUserResponse)
instance
Prelude.NFData
GenerateEmbedUrlForAnonymousUserResponse