{-# 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.SageMaker.CreatePresignedDomainUrl
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Creates a URL for a specified UserProfile in a Domain. When accessed in
-- a web browser, the user will be automatically signed in to Amazon
-- SageMaker Studio, and granted access to all of the Apps and files
-- associated with the Domain\'s Amazon Elastic File System (EFS) volume.
-- This operation can only be called when the authentication mode equals
-- IAM.
--
-- The IAM role or user used to call this API defines the permissions to
-- access the app. Once the presigned URL is created, no additional
-- permission is required to access this URL. IAM authorization policies
-- for this API are also enforced for every HTTP request and WebSocket
-- frame that attempts to connect to the app.
--
-- You can restrict access to this API and to the URL that it returns to a
-- list of IP addresses, Amazon VPCs or Amazon VPC Endpoints that you
-- specify. For more information, see
-- <https://docs.aws.amazon.com/sagemaker/latest/dg/studio-interface-endpoint.html Connect to SageMaker Studio Through an Interface VPC Endpoint>
-- .
--
-- The URL that you get from a call to @CreatePresignedDomainUrl@ has a
-- default timeout of 5 minutes. You can configure this value using
-- @ExpiresInSeconds@. If you try to use the URL after the timeout limit
-- expires, you are directed to the Amazon Web Services console sign-in
-- page.
module Amazonka.SageMaker.CreatePresignedDomainUrl
  ( -- * Creating a Request
    CreatePresignedDomainUrl (..),
    newCreatePresignedDomainUrl,

    -- * Request Lenses
    createPresignedDomainUrl_sessionExpirationDurationInSeconds,
    createPresignedDomainUrl_expiresInSeconds,
    createPresignedDomainUrl_domainId,
    createPresignedDomainUrl_userProfileName,

    -- * Destructuring the Response
    CreatePresignedDomainUrlResponse (..),
    newCreatePresignedDomainUrlResponse,

    -- * Response Lenses
    createPresignedDomainUrlResponse_authorizedUrl,
    createPresignedDomainUrlResponse_httpStatus,
  )
where

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

-- | /See:/ 'newCreatePresignedDomainUrl' smart constructor.
data CreatePresignedDomainUrl = CreatePresignedDomainUrl'
  { -- | The session expiration duration in seconds. This value defaults to
    -- 43200.
    CreatePresignedDomainUrl -> Maybe Natural
sessionExpirationDurationInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The number of seconds until the pre-signed URL expires. This value
    -- defaults to 300.
    CreatePresignedDomainUrl -> Maybe Natural
expiresInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The domain ID.
    CreatePresignedDomainUrl -> Text
domainId :: Prelude.Text,
    -- | The name of the UserProfile to sign-in as.
    CreatePresignedDomainUrl -> Text
userProfileName :: Prelude.Text
  }
  deriving (CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool
(CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool)
-> (CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool)
-> Eq CreatePresignedDomainUrl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool
$c/= :: CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool
== :: CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool
$c== :: CreatePresignedDomainUrl -> CreatePresignedDomainUrl -> Bool
Prelude.Eq, ReadPrec [CreatePresignedDomainUrl]
ReadPrec CreatePresignedDomainUrl
Int -> ReadS CreatePresignedDomainUrl
ReadS [CreatePresignedDomainUrl]
(Int -> ReadS CreatePresignedDomainUrl)
-> ReadS [CreatePresignedDomainUrl]
-> ReadPrec CreatePresignedDomainUrl
-> ReadPrec [CreatePresignedDomainUrl]
-> Read CreatePresignedDomainUrl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePresignedDomainUrl]
$creadListPrec :: ReadPrec [CreatePresignedDomainUrl]
readPrec :: ReadPrec CreatePresignedDomainUrl
$creadPrec :: ReadPrec CreatePresignedDomainUrl
readList :: ReadS [CreatePresignedDomainUrl]
$creadList :: ReadS [CreatePresignedDomainUrl]
readsPrec :: Int -> ReadS CreatePresignedDomainUrl
$creadsPrec :: Int -> ReadS CreatePresignedDomainUrl
Prelude.Read, Int -> CreatePresignedDomainUrl -> ShowS
[CreatePresignedDomainUrl] -> ShowS
CreatePresignedDomainUrl -> String
(Int -> CreatePresignedDomainUrl -> ShowS)
-> (CreatePresignedDomainUrl -> String)
-> ([CreatePresignedDomainUrl] -> ShowS)
-> Show CreatePresignedDomainUrl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePresignedDomainUrl] -> ShowS
$cshowList :: [CreatePresignedDomainUrl] -> ShowS
show :: CreatePresignedDomainUrl -> String
$cshow :: CreatePresignedDomainUrl -> String
showsPrec :: Int -> CreatePresignedDomainUrl -> ShowS
$cshowsPrec :: Int -> CreatePresignedDomainUrl -> ShowS
Prelude.Show, (forall x.
 CreatePresignedDomainUrl -> Rep CreatePresignedDomainUrl x)
-> (forall x.
    Rep CreatePresignedDomainUrl x -> CreatePresignedDomainUrl)
-> Generic CreatePresignedDomainUrl
forall x.
Rep CreatePresignedDomainUrl x -> CreatePresignedDomainUrl
forall x.
CreatePresignedDomainUrl -> Rep CreatePresignedDomainUrl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePresignedDomainUrl x -> CreatePresignedDomainUrl
$cfrom :: forall x.
CreatePresignedDomainUrl -> Rep CreatePresignedDomainUrl x
Prelude.Generic)

-- |
-- Create a value of 'CreatePresignedDomainUrl' 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:
--
-- 'sessionExpirationDurationInSeconds', 'createPresignedDomainUrl_sessionExpirationDurationInSeconds' - The session expiration duration in seconds. This value defaults to
-- 43200.
--
-- 'expiresInSeconds', 'createPresignedDomainUrl_expiresInSeconds' - The number of seconds until the pre-signed URL expires. This value
-- defaults to 300.
--
-- 'domainId', 'createPresignedDomainUrl_domainId' - The domain ID.
--
-- 'userProfileName', 'createPresignedDomainUrl_userProfileName' - The name of the UserProfile to sign-in as.
newCreatePresignedDomainUrl ::
  -- | 'domainId'
  Prelude.Text ->
  -- | 'userProfileName'
  Prelude.Text ->
  CreatePresignedDomainUrl
newCreatePresignedDomainUrl :: Text -> Text -> CreatePresignedDomainUrl
newCreatePresignedDomainUrl
  Text
pDomainId_
  Text
pUserProfileName_ =
    CreatePresignedDomainUrl' :: Maybe Natural
-> Maybe Natural -> Text -> Text -> CreatePresignedDomainUrl
CreatePresignedDomainUrl'
      { $sel:sessionExpirationDurationInSeconds:CreatePresignedDomainUrl' :: Maybe Natural
sessionExpirationDurationInSeconds =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:expiresInSeconds:CreatePresignedDomainUrl' :: Maybe Natural
expiresInSeconds = Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:domainId:CreatePresignedDomainUrl' :: Text
domainId = Text
pDomainId_,
        $sel:userProfileName:CreatePresignedDomainUrl' :: Text
userProfileName = Text
pUserProfileName_
      }

-- | The session expiration duration in seconds. This value defaults to
-- 43200.
createPresignedDomainUrl_sessionExpirationDurationInSeconds :: Lens.Lens' CreatePresignedDomainUrl (Prelude.Maybe Prelude.Natural)
createPresignedDomainUrl_sessionExpirationDurationInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreatePresignedDomainUrl -> f CreatePresignedDomainUrl
createPresignedDomainUrl_sessionExpirationDurationInSeconds = (CreatePresignedDomainUrl -> Maybe Natural)
-> (CreatePresignedDomainUrl
    -> Maybe Natural -> CreatePresignedDomainUrl)
-> Lens
     CreatePresignedDomainUrl
     CreatePresignedDomainUrl
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePresignedDomainUrl' {Maybe Natural
sessionExpirationDurationInSeconds :: Maybe Natural
$sel:sessionExpirationDurationInSeconds:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Maybe Natural
sessionExpirationDurationInSeconds} -> Maybe Natural
sessionExpirationDurationInSeconds) (\s :: CreatePresignedDomainUrl
s@CreatePresignedDomainUrl' {} Maybe Natural
a -> CreatePresignedDomainUrl
s {$sel:sessionExpirationDurationInSeconds:CreatePresignedDomainUrl' :: Maybe Natural
sessionExpirationDurationInSeconds = Maybe Natural
a} :: CreatePresignedDomainUrl)

-- | The number of seconds until the pre-signed URL expires. This value
-- defaults to 300.
createPresignedDomainUrl_expiresInSeconds :: Lens.Lens' CreatePresignedDomainUrl (Prelude.Maybe Prelude.Natural)
createPresignedDomainUrl_expiresInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreatePresignedDomainUrl -> f CreatePresignedDomainUrl
createPresignedDomainUrl_expiresInSeconds = (CreatePresignedDomainUrl -> Maybe Natural)
-> (CreatePresignedDomainUrl
    -> Maybe Natural -> CreatePresignedDomainUrl)
-> Lens
     CreatePresignedDomainUrl
     CreatePresignedDomainUrl
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePresignedDomainUrl' {Maybe Natural
expiresInSeconds :: Maybe Natural
$sel:expiresInSeconds:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Maybe Natural
expiresInSeconds} -> Maybe Natural
expiresInSeconds) (\s :: CreatePresignedDomainUrl
s@CreatePresignedDomainUrl' {} Maybe Natural
a -> CreatePresignedDomainUrl
s {$sel:expiresInSeconds:CreatePresignedDomainUrl' :: Maybe Natural
expiresInSeconds = Maybe Natural
a} :: CreatePresignedDomainUrl)

-- | The domain ID.
createPresignedDomainUrl_domainId :: Lens.Lens' CreatePresignedDomainUrl Prelude.Text
createPresignedDomainUrl_domainId :: (Text -> f Text)
-> CreatePresignedDomainUrl -> f CreatePresignedDomainUrl
createPresignedDomainUrl_domainId = (CreatePresignedDomainUrl -> Text)
-> (CreatePresignedDomainUrl -> Text -> CreatePresignedDomainUrl)
-> Lens CreatePresignedDomainUrl CreatePresignedDomainUrl Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePresignedDomainUrl' {Text
domainId :: Text
$sel:domainId:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Text
domainId} -> Text
domainId) (\s :: CreatePresignedDomainUrl
s@CreatePresignedDomainUrl' {} Text
a -> CreatePresignedDomainUrl
s {$sel:domainId:CreatePresignedDomainUrl' :: Text
domainId = Text
a} :: CreatePresignedDomainUrl)

-- | The name of the UserProfile to sign-in as.
createPresignedDomainUrl_userProfileName :: Lens.Lens' CreatePresignedDomainUrl Prelude.Text
createPresignedDomainUrl_userProfileName :: (Text -> f Text)
-> CreatePresignedDomainUrl -> f CreatePresignedDomainUrl
createPresignedDomainUrl_userProfileName = (CreatePresignedDomainUrl -> Text)
-> (CreatePresignedDomainUrl -> Text -> CreatePresignedDomainUrl)
-> Lens CreatePresignedDomainUrl CreatePresignedDomainUrl Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePresignedDomainUrl' {Text
userProfileName :: Text
$sel:userProfileName:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Text
userProfileName} -> Text
userProfileName) (\s :: CreatePresignedDomainUrl
s@CreatePresignedDomainUrl' {} Text
a -> CreatePresignedDomainUrl
s {$sel:userProfileName:CreatePresignedDomainUrl' :: Text
userProfileName = Text
a} :: CreatePresignedDomainUrl)

instance Core.AWSRequest CreatePresignedDomainUrl where
  type
    AWSResponse CreatePresignedDomainUrl =
      CreatePresignedDomainUrlResponse
  request :: CreatePresignedDomainUrl -> Request CreatePresignedDomainUrl
request = Service
-> CreatePresignedDomainUrl -> Request CreatePresignedDomainUrl
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
  response :: Logger
-> Service
-> Proxy CreatePresignedDomainUrl
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreatePresignedDomainUrl)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse CreatePresignedDomainUrl))
-> Logger
-> Service
-> Proxy CreatePresignedDomainUrl
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse CreatePresignedDomainUrl)))
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 -> Int -> CreatePresignedDomainUrlResponse
CreatePresignedDomainUrlResponse'
            (Maybe Text -> Int -> CreatePresignedDomainUrlResponse)
-> Either String (Maybe Text)
-> Either String (Int -> CreatePresignedDomainUrlResponse)
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
"AuthorizedUrl")
            Either String (Int -> CreatePresignedDomainUrlResponse)
-> Either String Int
-> Either String CreatePresignedDomainUrlResponse
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 CreatePresignedDomainUrl

instance Prelude.NFData CreatePresignedDomainUrl

instance Core.ToHeaders CreatePresignedDomainUrl where
  toHeaders :: CreatePresignedDomainUrl -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreatePresignedDomainUrl -> 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
"SageMaker.CreatePresignedDomainUrl" ::
                          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 CreatePresignedDomainUrl where
  toJSON :: CreatePresignedDomainUrl -> Value
toJSON CreatePresignedDomainUrl' {Maybe Natural
Text
userProfileName :: Text
domainId :: Text
expiresInSeconds :: Maybe Natural
sessionExpirationDurationInSeconds :: Maybe Natural
$sel:userProfileName:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Text
$sel:domainId:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Text
$sel:expiresInSeconds:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Maybe Natural
$sel:sessionExpirationDurationInSeconds:CreatePresignedDomainUrl' :: CreatePresignedDomainUrl -> Maybe Natural
..} =
    [Pair] -> Value
Core.object
      ( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
          [ (Text
"SessionExpirationDurationInSeconds" 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
sessionExpirationDurationInSeconds,
            (Text
"ExpiresInSeconds" 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
expiresInSeconds,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"DomainId" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
domainId),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"UserProfileName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
userProfileName)
          ]
      )

instance Core.ToPath CreatePresignedDomainUrl where
  toPath :: CreatePresignedDomainUrl -> ByteString
toPath = ByteString -> CreatePresignedDomainUrl -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/"

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

-- | /See:/ 'newCreatePresignedDomainUrlResponse' smart constructor.
data CreatePresignedDomainUrlResponse = CreatePresignedDomainUrlResponse'
  { -- | The presigned URL.
    CreatePresignedDomainUrlResponse -> Maybe Text
authorizedUrl :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    CreatePresignedDomainUrlResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (CreatePresignedDomainUrlResponse
-> CreatePresignedDomainUrlResponse -> Bool
(CreatePresignedDomainUrlResponse
 -> CreatePresignedDomainUrlResponse -> Bool)
-> (CreatePresignedDomainUrlResponse
    -> CreatePresignedDomainUrlResponse -> Bool)
-> Eq CreatePresignedDomainUrlResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreatePresignedDomainUrlResponse
-> CreatePresignedDomainUrlResponse -> Bool
$c/= :: CreatePresignedDomainUrlResponse
-> CreatePresignedDomainUrlResponse -> Bool
== :: CreatePresignedDomainUrlResponse
-> CreatePresignedDomainUrlResponse -> Bool
$c== :: CreatePresignedDomainUrlResponse
-> CreatePresignedDomainUrlResponse -> Bool
Prelude.Eq, ReadPrec [CreatePresignedDomainUrlResponse]
ReadPrec CreatePresignedDomainUrlResponse
Int -> ReadS CreatePresignedDomainUrlResponse
ReadS [CreatePresignedDomainUrlResponse]
(Int -> ReadS CreatePresignedDomainUrlResponse)
-> ReadS [CreatePresignedDomainUrlResponse]
-> ReadPrec CreatePresignedDomainUrlResponse
-> ReadPrec [CreatePresignedDomainUrlResponse]
-> Read CreatePresignedDomainUrlResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreatePresignedDomainUrlResponse]
$creadListPrec :: ReadPrec [CreatePresignedDomainUrlResponse]
readPrec :: ReadPrec CreatePresignedDomainUrlResponse
$creadPrec :: ReadPrec CreatePresignedDomainUrlResponse
readList :: ReadS [CreatePresignedDomainUrlResponse]
$creadList :: ReadS [CreatePresignedDomainUrlResponse]
readsPrec :: Int -> ReadS CreatePresignedDomainUrlResponse
$creadsPrec :: Int -> ReadS CreatePresignedDomainUrlResponse
Prelude.Read, Int -> CreatePresignedDomainUrlResponse -> ShowS
[CreatePresignedDomainUrlResponse] -> ShowS
CreatePresignedDomainUrlResponse -> String
(Int -> CreatePresignedDomainUrlResponse -> ShowS)
-> (CreatePresignedDomainUrlResponse -> String)
-> ([CreatePresignedDomainUrlResponse] -> ShowS)
-> Show CreatePresignedDomainUrlResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreatePresignedDomainUrlResponse] -> ShowS
$cshowList :: [CreatePresignedDomainUrlResponse] -> ShowS
show :: CreatePresignedDomainUrlResponse -> String
$cshow :: CreatePresignedDomainUrlResponse -> String
showsPrec :: Int -> CreatePresignedDomainUrlResponse -> ShowS
$cshowsPrec :: Int -> CreatePresignedDomainUrlResponse -> ShowS
Prelude.Show, (forall x.
 CreatePresignedDomainUrlResponse
 -> Rep CreatePresignedDomainUrlResponse x)
-> (forall x.
    Rep CreatePresignedDomainUrlResponse x
    -> CreatePresignedDomainUrlResponse)
-> Generic CreatePresignedDomainUrlResponse
forall x.
Rep CreatePresignedDomainUrlResponse x
-> CreatePresignedDomainUrlResponse
forall x.
CreatePresignedDomainUrlResponse
-> Rep CreatePresignedDomainUrlResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreatePresignedDomainUrlResponse x
-> CreatePresignedDomainUrlResponse
$cfrom :: forall x.
CreatePresignedDomainUrlResponse
-> Rep CreatePresignedDomainUrlResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreatePresignedDomainUrlResponse' 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:
--
-- 'authorizedUrl', 'createPresignedDomainUrlResponse_authorizedUrl' - The presigned URL.
--
-- 'httpStatus', 'createPresignedDomainUrlResponse_httpStatus' - The response's http status code.
newCreatePresignedDomainUrlResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreatePresignedDomainUrlResponse
newCreatePresignedDomainUrlResponse :: Int -> CreatePresignedDomainUrlResponse
newCreatePresignedDomainUrlResponse Int
pHttpStatus_ =
  CreatePresignedDomainUrlResponse' :: Maybe Text -> Int -> CreatePresignedDomainUrlResponse
CreatePresignedDomainUrlResponse'
    { $sel:authorizedUrl:CreatePresignedDomainUrlResponse' :: Maybe Text
authorizedUrl =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreatePresignedDomainUrlResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The presigned URL.
createPresignedDomainUrlResponse_authorizedUrl :: Lens.Lens' CreatePresignedDomainUrlResponse (Prelude.Maybe Prelude.Text)
createPresignedDomainUrlResponse_authorizedUrl :: (Maybe Text -> f (Maybe Text))
-> CreatePresignedDomainUrlResponse
-> f CreatePresignedDomainUrlResponse
createPresignedDomainUrlResponse_authorizedUrl = (CreatePresignedDomainUrlResponse -> Maybe Text)
-> (CreatePresignedDomainUrlResponse
    -> Maybe Text -> CreatePresignedDomainUrlResponse)
-> Lens
     CreatePresignedDomainUrlResponse
     CreatePresignedDomainUrlResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreatePresignedDomainUrlResponse' {Maybe Text
authorizedUrl :: Maybe Text
$sel:authorizedUrl:CreatePresignedDomainUrlResponse' :: CreatePresignedDomainUrlResponse -> Maybe Text
authorizedUrl} -> Maybe Text
authorizedUrl) (\s :: CreatePresignedDomainUrlResponse
s@CreatePresignedDomainUrlResponse' {} Maybe Text
a -> CreatePresignedDomainUrlResponse
s {$sel:authorizedUrl:CreatePresignedDomainUrlResponse' :: Maybe Text
authorizedUrl = Maybe Text
a} :: CreatePresignedDomainUrlResponse)

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

instance
  Prelude.NFData
    CreatePresignedDomainUrlResponse