{-# 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 #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.WorkSpacesWeb.CreatePortal
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a web portal.
module Amazonka.WorkSpacesWeb.CreatePortal
  ( -- * Creating a Request
    CreatePortal (..),
    newCreatePortal,

    -- * Request Lenses
    createPortal_additionalEncryptionContext,
    createPortal_clientToken,
    createPortal_customerManagedKey,
    createPortal_displayName,
    createPortal_tags,

    -- * Destructuring the Response
    CreatePortalResponse (..),
    newCreatePortalResponse,

    -- * Response Lenses
    createPortalResponse_httpStatus,
    createPortalResponse_portalArn,
    createPortalResponse_portalEndpoint,
  )
where

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
import Amazonka.WorkSpacesWeb.Types

-- | /See:/ 'newCreatePortal' smart constructor.
data CreatePortal = CreatePortal'
  { -- | The additional encryption context of the portal.
    CreatePortal -> Maybe (HashMap Text Text)
additionalEncryptionContext :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
    -- | A unique, case-sensitive identifier that you provide to ensure the
    -- idempotency of the request. Idempotency ensures that an API request
    -- completes only once. With an idempotent request, if the original request
    -- completes successfully, subsequent retries with the same client token
    -- returns the result from the original successful request.
    --
    -- If you do not specify a client token, one is automatically generated by
    -- the AWS SDK.
    CreatePortal -> Maybe Text
clientToken :: Prelude.Maybe Prelude.Text,
    -- | The customer managed key of the web portal.
    CreatePortal -> Maybe Text
customerManagedKey :: Prelude.Maybe Prelude.Text,
    -- | The name of the web portal. This is not visible to users who log into
    -- the web portal.
    CreatePortal -> Maybe (Sensitive Text)
displayName :: Prelude.Maybe (Data.Sensitive Prelude.Text),
    -- | The tags to add to the web portal. A tag is a key-value pair.
    CreatePortal -> Maybe [Sensitive Tag]
tags :: Prelude.Maybe [Data.Sensitive Tag]
  }
  deriving (CreatePortal -> CreatePortal -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePortal -> CreatePortal -> Bool
$c/= :: CreatePortal -> CreatePortal -> Bool
== :: CreatePortal -> CreatePortal -> Bool
$c== :: CreatePortal -> CreatePortal -> Bool
Prelude.Eq, Int -> CreatePortal -> ShowS
[CreatePortal] -> ShowS
CreatePortal -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePortal] -> ShowS
$cshowList :: [CreatePortal] -> ShowS
show :: CreatePortal -> String
$cshow :: CreatePortal -> String
showsPrec :: Int -> CreatePortal -> ShowS
$cshowsPrec :: Int -> CreatePortal -> ShowS
Prelude.Show, forall x. Rep CreatePortal x -> CreatePortal
forall x. CreatePortal -> Rep CreatePortal x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePortal x -> CreatePortal
$cfrom :: forall x. CreatePortal -> Rep CreatePortal x
Prelude.Generic)

-- |
-- Create a value of 'CreatePortal' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'additionalEncryptionContext', 'createPortal_additionalEncryptionContext' - The additional encryption context of the portal.
--
-- 'clientToken', 'createPortal_clientToken' - A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Idempotency ensures that an API request
-- completes only once. With an idempotent request, if the original request
-- completes successfully, subsequent retries with the same client token
-- returns the result from the original successful request.
--
-- If you do not specify a client token, one is automatically generated by
-- the AWS SDK.
--
-- 'customerManagedKey', 'createPortal_customerManagedKey' - The customer managed key of the web portal.
--
-- 'displayName', 'createPortal_displayName' - The name of the web portal. This is not visible to users who log into
-- the web portal.
--
-- 'tags', 'createPortal_tags' - The tags to add to the web portal. A tag is a key-value pair.
newCreatePortal ::
  CreatePortal
newCreatePortal :: CreatePortal
newCreatePortal =
  CreatePortal'
    { $sel:additionalEncryptionContext:CreatePortal' :: Maybe (HashMap Text Text)
additionalEncryptionContext =
        forall a. Maybe a
Prelude.Nothing,
      $sel:clientToken:CreatePortal' :: Maybe Text
clientToken = forall a. Maybe a
Prelude.Nothing,
      $sel:customerManagedKey:CreatePortal' :: Maybe Text
customerManagedKey = forall a. Maybe a
Prelude.Nothing,
      $sel:displayName:CreatePortal' :: Maybe (Sensitive Text)
displayName = forall a. Maybe a
Prelude.Nothing,
      $sel:tags:CreatePortal' :: Maybe [Sensitive Tag]
tags = forall a. Maybe a
Prelude.Nothing
    }

-- | The additional encryption context of the portal.
createPortal_additionalEncryptionContext :: Lens.Lens' CreatePortal (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
createPortal_additionalEncryptionContext :: Lens' CreatePortal (Maybe (HashMap Text Text))
createPortal_additionalEncryptionContext = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortal' {Maybe (HashMap Text Text)
additionalEncryptionContext :: Maybe (HashMap Text Text)
$sel:additionalEncryptionContext:CreatePortal' :: CreatePortal -> Maybe (HashMap Text Text)
additionalEncryptionContext} -> Maybe (HashMap Text Text)
additionalEncryptionContext) (\s :: CreatePortal
s@CreatePortal' {} Maybe (HashMap Text Text)
a -> CreatePortal
s {$sel:additionalEncryptionContext:CreatePortal' :: Maybe (HashMap Text Text)
additionalEncryptionContext = Maybe (HashMap Text Text)
a} :: CreatePortal) 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

-- | A unique, case-sensitive identifier that you provide to ensure the
-- idempotency of the request. Idempotency ensures that an API request
-- completes only once. With an idempotent request, if the original request
-- completes successfully, subsequent retries with the same client token
-- returns the result from the original successful request.
--
-- If you do not specify a client token, one is automatically generated by
-- the AWS SDK.
createPortal_clientToken :: Lens.Lens' CreatePortal (Prelude.Maybe Prelude.Text)
createPortal_clientToken :: Lens' CreatePortal (Maybe Text)
createPortal_clientToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortal' {Maybe Text
clientToken :: Maybe Text
$sel:clientToken:CreatePortal' :: CreatePortal -> Maybe Text
clientToken} -> Maybe Text
clientToken) (\s :: CreatePortal
s@CreatePortal' {} Maybe Text
a -> CreatePortal
s {$sel:clientToken:CreatePortal' :: Maybe Text
clientToken = Maybe Text
a} :: CreatePortal)

-- | The customer managed key of the web portal.
createPortal_customerManagedKey :: Lens.Lens' CreatePortal (Prelude.Maybe Prelude.Text)
createPortal_customerManagedKey :: Lens' CreatePortal (Maybe Text)
createPortal_customerManagedKey = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortal' {Maybe Text
customerManagedKey :: Maybe Text
$sel:customerManagedKey:CreatePortal' :: CreatePortal -> Maybe Text
customerManagedKey} -> Maybe Text
customerManagedKey) (\s :: CreatePortal
s@CreatePortal' {} Maybe Text
a -> CreatePortal
s {$sel:customerManagedKey:CreatePortal' :: Maybe Text
customerManagedKey = Maybe Text
a} :: CreatePortal)

-- | The name of the web portal. This is not visible to users who log into
-- the web portal.
createPortal_displayName :: Lens.Lens' CreatePortal (Prelude.Maybe Prelude.Text)
createPortal_displayName :: Lens' CreatePortal (Maybe Text)
createPortal_displayName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortal' {Maybe (Sensitive Text)
displayName :: Maybe (Sensitive Text)
$sel:displayName:CreatePortal' :: CreatePortal -> Maybe (Sensitive Text)
displayName} -> Maybe (Sensitive Text)
displayName) (\s :: CreatePortal
s@CreatePortal' {} Maybe (Sensitive Text)
a -> CreatePortal
s {$sel:displayName:CreatePortal' :: Maybe (Sensitive Text)
displayName = Maybe (Sensitive Text)
a} :: CreatePortal) 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 a. Iso' (Sensitive a) a
Data._Sensitive

-- | The tags to add to the web portal. A tag is a key-value pair.
createPortal_tags :: Lens.Lens' CreatePortal (Prelude.Maybe [Tag])
createPortal_tags :: Lens' CreatePortal (Maybe [Tag])
createPortal_tags = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortal' {Maybe [Sensitive Tag]
tags :: Maybe [Sensitive Tag]
$sel:tags:CreatePortal' :: CreatePortal -> Maybe [Sensitive Tag]
tags} -> Maybe [Sensitive Tag]
tags) (\s :: CreatePortal
s@CreatePortal' {} Maybe [Sensitive Tag]
a -> CreatePortal
s {$sel:tags:CreatePortal' :: Maybe [Sensitive Tag]
tags = Maybe [Sensitive Tag]
a} :: CreatePortal) 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

instance Core.AWSRequest CreatePortal where
  type AWSResponse CreatePortal = CreatePortalResponse
  request :: (Service -> Service) -> CreatePortal -> Request CreatePortal
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 CreatePortal
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse CreatePortal)))
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 ->
          Int -> Text -> Text -> CreatePortalResponse
CreatePortalResponse'
            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))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"portalArn")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Either String a
Data..:> Key
"portalEndpoint")
      )

instance Prelude.Hashable CreatePortal where
  hashWithSalt :: Int -> CreatePortal -> Int
hashWithSalt Int
_salt CreatePortal' {Maybe [Sensitive Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
tags :: Maybe [Sensitive Tag]
displayName :: Maybe (Sensitive Text)
customerManagedKey :: Maybe Text
clientToken :: Maybe Text
additionalEncryptionContext :: Maybe (HashMap Text Text)
$sel:tags:CreatePortal' :: CreatePortal -> Maybe [Sensitive Tag]
$sel:displayName:CreatePortal' :: CreatePortal -> Maybe (Sensitive Text)
$sel:customerManagedKey:CreatePortal' :: CreatePortal -> Maybe Text
$sel:clientToken:CreatePortal' :: CreatePortal -> Maybe Text
$sel:additionalEncryptionContext:CreatePortal' :: CreatePortal -> Maybe (HashMap Text Text)
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
additionalEncryptionContext
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
clientToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
customerManagedKey
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (Sensitive Text)
displayName
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Sensitive Tag]
tags

instance Prelude.NFData CreatePortal where
  rnf :: CreatePortal -> ()
rnf CreatePortal' {Maybe [Sensitive Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
tags :: Maybe [Sensitive Tag]
displayName :: Maybe (Sensitive Text)
customerManagedKey :: Maybe Text
clientToken :: Maybe Text
additionalEncryptionContext :: Maybe (HashMap Text Text)
$sel:tags:CreatePortal' :: CreatePortal -> Maybe [Sensitive Tag]
$sel:displayName:CreatePortal' :: CreatePortal -> Maybe (Sensitive Text)
$sel:customerManagedKey:CreatePortal' :: CreatePortal -> Maybe Text
$sel:clientToken:CreatePortal' :: CreatePortal -> Maybe Text
$sel:additionalEncryptionContext:CreatePortal' :: CreatePortal -> Maybe (HashMap Text Text)
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
additionalEncryptionContext
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
clientToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
customerManagedKey
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (Sensitive Text)
displayName
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Sensitive Tag]
tags

instance Data.ToHeaders CreatePortal where
  toHeaders :: CreatePortal -> ResponseHeaders
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToJSON CreatePortal where
  toJSON :: CreatePortal -> Value
toJSON CreatePortal' {Maybe [Sensitive Tag]
Maybe Text
Maybe (HashMap Text Text)
Maybe (Sensitive Text)
tags :: Maybe [Sensitive Tag]
displayName :: Maybe (Sensitive Text)
customerManagedKey :: Maybe Text
clientToken :: Maybe Text
additionalEncryptionContext :: Maybe (HashMap Text Text)
$sel:tags:CreatePortal' :: CreatePortal -> Maybe [Sensitive Tag]
$sel:displayName:CreatePortal' :: CreatePortal -> Maybe (Sensitive Text)
$sel:customerManagedKey:CreatePortal' :: CreatePortal -> Maybe Text
$sel:clientToken:CreatePortal' :: CreatePortal -> Maybe Text
$sel:additionalEncryptionContext:CreatePortal' :: CreatePortal -> Maybe (HashMap Text Text)
..} =
    [Pair] -> Value
Data.object
      ( forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Key
"additionalEncryptionContext" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
additionalEncryptionContext,
            (Key
"clientToken" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
clientToken,
            (Key
"customerManagedKey" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
              forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
customerManagedKey,
            (Key
"displayName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (Sensitive Text)
displayName,
            (Key
"tags" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=) forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Sensitive Tag]
tags
          ]
      )

instance Data.ToPath CreatePortal where
  toPath :: CreatePortal -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/portals"

instance Data.ToQuery CreatePortal where
  toQuery :: CreatePortal -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newCreatePortalResponse' smart constructor.
data CreatePortalResponse = CreatePortalResponse'
  { -- | The response's http status code.
    CreatePortalResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ARN of the web portal.
    CreatePortalResponse -> Text
portalArn :: Prelude.Text,
    -- | The endpoint URL of the web portal that users access in order to start
    -- streaming sessions.
    CreatePortalResponse -> Text
portalEndpoint :: Prelude.Text
  }
  deriving (CreatePortalResponse -> CreatePortalResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePortalResponse -> CreatePortalResponse -> Bool
$c/= :: CreatePortalResponse -> CreatePortalResponse -> Bool
== :: CreatePortalResponse -> CreatePortalResponse -> Bool
$c== :: CreatePortalResponse -> CreatePortalResponse -> Bool
Prelude.Eq, ReadPrec [CreatePortalResponse]
ReadPrec CreatePortalResponse
Int -> ReadS CreatePortalResponse
ReadS [CreatePortalResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePortalResponse]
$creadListPrec :: ReadPrec [CreatePortalResponse]
readPrec :: ReadPrec CreatePortalResponse
$creadPrec :: ReadPrec CreatePortalResponse
readList :: ReadS [CreatePortalResponse]
$creadList :: ReadS [CreatePortalResponse]
readsPrec :: Int -> ReadS CreatePortalResponse
$creadsPrec :: Int -> ReadS CreatePortalResponse
Prelude.Read, Int -> CreatePortalResponse -> ShowS
[CreatePortalResponse] -> ShowS
CreatePortalResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePortalResponse] -> ShowS
$cshowList :: [CreatePortalResponse] -> ShowS
show :: CreatePortalResponse -> String
$cshow :: CreatePortalResponse -> String
showsPrec :: Int -> CreatePortalResponse -> ShowS
$cshowsPrec :: Int -> CreatePortalResponse -> ShowS
Prelude.Show, forall x. Rep CreatePortalResponse x -> CreatePortalResponse
forall x. CreatePortalResponse -> Rep CreatePortalResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep CreatePortalResponse x -> CreatePortalResponse
$cfrom :: forall x. CreatePortalResponse -> Rep CreatePortalResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreatePortalResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createPortalResponse_httpStatus' - The response's http status code.
--
-- 'portalArn', 'createPortalResponse_portalArn' - The ARN of the web portal.
--
-- 'portalEndpoint', 'createPortalResponse_portalEndpoint' - The endpoint URL of the web portal that users access in order to start
-- streaming sessions.
newCreatePortalResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'portalArn'
  Prelude.Text ->
  -- | 'portalEndpoint'
  Prelude.Text ->
  CreatePortalResponse
newCreatePortalResponse :: Int -> Text -> Text -> CreatePortalResponse
newCreatePortalResponse
  Int
pHttpStatus_
  Text
pPortalArn_
  Text
pPortalEndpoint_ =
    CreatePortalResponse'
      { $sel:httpStatus:CreatePortalResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:portalArn:CreatePortalResponse' :: Text
portalArn = Text
pPortalArn_,
        $sel:portalEndpoint:CreatePortalResponse' :: Text
portalEndpoint = Text
pPortalEndpoint_
      }

-- | The response's http status code.
createPortalResponse_httpStatus :: Lens.Lens' CreatePortalResponse Prelude.Int
createPortalResponse_httpStatus :: Lens' CreatePortalResponse Int
createPortalResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortalResponse' {Int
httpStatus :: Int
$sel:httpStatus:CreatePortalResponse' :: CreatePortalResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: CreatePortalResponse
s@CreatePortalResponse' {} Int
a -> CreatePortalResponse
s {$sel:httpStatus:CreatePortalResponse' :: Int
httpStatus = Int
a} :: CreatePortalResponse)

-- | The ARN of the web portal.
createPortalResponse_portalArn :: Lens.Lens' CreatePortalResponse Prelude.Text
createPortalResponse_portalArn :: Lens' CreatePortalResponse Text
createPortalResponse_portalArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortalResponse' {Text
portalArn :: Text
$sel:portalArn:CreatePortalResponse' :: CreatePortalResponse -> Text
portalArn} -> Text
portalArn) (\s :: CreatePortalResponse
s@CreatePortalResponse' {} Text
a -> CreatePortalResponse
s {$sel:portalArn:CreatePortalResponse' :: Text
portalArn = Text
a} :: CreatePortalResponse)

-- | The endpoint URL of the web portal that users access in order to start
-- streaming sessions.
createPortalResponse_portalEndpoint :: Lens.Lens' CreatePortalResponse Prelude.Text
createPortalResponse_portalEndpoint :: Lens' CreatePortalResponse Text
createPortalResponse_portalEndpoint = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePortalResponse' {Text
portalEndpoint :: Text
$sel:portalEndpoint:CreatePortalResponse' :: CreatePortalResponse -> Text
portalEndpoint} -> Text
portalEndpoint) (\s :: CreatePortalResponse
s@CreatePortalResponse' {} Text
a -> CreatePortalResponse
s {$sel:portalEndpoint:CreatePortalResponse' :: Text
portalEndpoint = Text
a} :: CreatePortalResponse)

instance Prelude.NFData CreatePortalResponse where
  rnf :: CreatePortalResponse -> ()
rnf CreatePortalResponse' {Int
Text
portalEndpoint :: Text
portalArn :: Text
httpStatus :: Int
$sel:portalEndpoint:CreatePortalResponse' :: CreatePortalResponse -> Text
$sel:portalArn:CreatePortalResponse' :: CreatePortalResponse -> Text
$sel:httpStatus:CreatePortalResponse' :: CreatePortalResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
portalArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
portalEndpoint