{-# 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.KinesisAnalyticsV2.CreateApplicationPresignedUrl
-- 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 and returns a URL that you can use to connect to an
-- application\'s extension. Currently, the only available extension is the
-- Apache Flink dashboard.
--
-- The IAM role or user used to call this API defines the permissions to
-- access the extension. After 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 that attempts to
-- connect to the extension.
--
-- You control the amount of time that the URL will be valid using the
-- @SessionExpirationDurationInSeconds@ parameter. If you do not provide
-- this parameter, the returned URL is valid for twelve hours.
--
-- The URL that you get from a call to CreateApplicationPresignedUrl must
-- be used within 3 minutes to be valid. If you first try to use the URL
-- after the 3-minute limit expires, the service returns an HTTP 403
-- Forbidden error.
module Amazonka.KinesisAnalyticsV2.CreateApplicationPresignedUrl
  ( -- * Creating a Request
    CreateApplicationPresignedUrl (..),
    newCreateApplicationPresignedUrl,

    -- * Request Lenses
    createApplicationPresignedUrl_sessionExpirationDurationInSeconds,
    createApplicationPresignedUrl_applicationName,
    createApplicationPresignedUrl_urlType,

    -- * Destructuring the Response
    CreateApplicationPresignedUrlResponse (..),
    newCreateApplicationPresignedUrlResponse,

    -- * Response Lenses
    createApplicationPresignedUrlResponse_authorizedUrl,
    createApplicationPresignedUrlResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.KinesisAnalyticsV2.Types
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newCreateApplicationPresignedUrl' smart constructor.
data CreateApplicationPresignedUrl = CreateApplicationPresignedUrl'
  { -- | The duration in seconds for which the returned URL will be valid.
    CreateApplicationPresignedUrl -> Maybe Natural
sessionExpirationDurationInSeconds :: Prelude.Maybe Prelude.Natural,
    -- | The name of the application.
    CreateApplicationPresignedUrl -> Text
applicationName :: Prelude.Text,
    -- | The type of the extension for which to create and return a URL.
    -- Currently, the only valid extension URL type is @FLINK_DASHBOARD_URL@.
    CreateApplicationPresignedUrl -> UrlType
urlType :: UrlType
  }
  deriving (CreateApplicationPresignedUrl
-> CreateApplicationPresignedUrl -> Bool
(CreateApplicationPresignedUrl
 -> CreateApplicationPresignedUrl -> Bool)
-> (CreateApplicationPresignedUrl
    -> CreateApplicationPresignedUrl -> Bool)
-> Eq CreateApplicationPresignedUrl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateApplicationPresignedUrl
-> CreateApplicationPresignedUrl -> Bool
$c/= :: CreateApplicationPresignedUrl
-> CreateApplicationPresignedUrl -> Bool
== :: CreateApplicationPresignedUrl
-> CreateApplicationPresignedUrl -> Bool
$c== :: CreateApplicationPresignedUrl
-> CreateApplicationPresignedUrl -> Bool
Prelude.Eq, ReadPrec [CreateApplicationPresignedUrl]
ReadPrec CreateApplicationPresignedUrl
Int -> ReadS CreateApplicationPresignedUrl
ReadS [CreateApplicationPresignedUrl]
(Int -> ReadS CreateApplicationPresignedUrl)
-> ReadS [CreateApplicationPresignedUrl]
-> ReadPrec CreateApplicationPresignedUrl
-> ReadPrec [CreateApplicationPresignedUrl]
-> Read CreateApplicationPresignedUrl
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateApplicationPresignedUrl]
$creadListPrec :: ReadPrec [CreateApplicationPresignedUrl]
readPrec :: ReadPrec CreateApplicationPresignedUrl
$creadPrec :: ReadPrec CreateApplicationPresignedUrl
readList :: ReadS [CreateApplicationPresignedUrl]
$creadList :: ReadS [CreateApplicationPresignedUrl]
readsPrec :: Int -> ReadS CreateApplicationPresignedUrl
$creadsPrec :: Int -> ReadS CreateApplicationPresignedUrl
Prelude.Read, Int -> CreateApplicationPresignedUrl -> ShowS
[CreateApplicationPresignedUrl] -> ShowS
CreateApplicationPresignedUrl -> String
(Int -> CreateApplicationPresignedUrl -> ShowS)
-> (CreateApplicationPresignedUrl -> String)
-> ([CreateApplicationPresignedUrl] -> ShowS)
-> Show CreateApplicationPresignedUrl
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateApplicationPresignedUrl] -> ShowS
$cshowList :: [CreateApplicationPresignedUrl] -> ShowS
show :: CreateApplicationPresignedUrl -> String
$cshow :: CreateApplicationPresignedUrl -> String
showsPrec :: Int -> CreateApplicationPresignedUrl -> ShowS
$cshowsPrec :: Int -> CreateApplicationPresignedUrl -> ShowS
Prelude.Show, (forall x.
 CreateApplicationPresignedUrl
 -> Rep CreateApplicationPresignedUrl x)
-> (forall x.
    Rep CreateApplicationPresignedUrl x
    -> CreateApplicationPresignedUrl)
-> Generic CreateApplicationPresignedUrl
forall x.
Rep CreateApplicationPresignedUrl x
-> CreateApplicationPresignedUrl
forall x.
CreateApplicationPresignedUrl
-> Rep CreateApplicationPresignedUrl x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateApplicationPresignedUrl x
-> CreateApplicationPresignedUrl
$cfrom :: forall x.
CreateApplicationPresignedUrl
-> Rep CreateApplicationPresignedUrl x
Prelude.Generic)

-- |
-- Create a value of 'CreateApplicationPresignedUrl' 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', 'createApplicationPresignedUrl_sessionExpirationDurationInSeconds' - The duration in seconds for which the returned URL will be valid.
--
-- 'applicationName', 'createApplicationPresignedUrl_applicationName' - The name of the application.
--
-- 'urlType', 'createApplicationPresignedUrl_urlType' - The type of the extension for which to create and return a URL.
-- Currently, the only valid extension URL type is @FLINK_DASHBOARD_URL@.
newCreateApplicationPresignedUrl ::
  -- | 'applicationName'
  Prelude.Text ->
  -- | 'urlType'
  UrlType ->
  CreateApplicationPresignedUrl
newCreateApplicationPresignedUrl :: Text -> UrlType -> CreateApplicationPresignedUrl
newCreateApplicationPresignedUrl
  Text
pApplicationName_
  UrlType
pUrlType_ =
    CreateApplicationPresignedUrl' :: Maybe Natural -> Text -> UrlType -> CreateApplicationPresignedUrl
CreateApplicationPresignedUrl'
      { $sel:sessionExpirationDurationInSeconds:CreateApplicationPresignedUrl' :: Maybe Natural
sessionExpirationDurationInSeconds =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:applicationName:CreateApplicationPresignedUrl' :: Text
applicationName = Text
pApplicationName_,
        $sel:urlType:CreateApplicationPresignedUrl' :: UrlType
urlType = UrlType
pUrlType_
      }

-- | The duration in seconds for which the returned URL will be valid.
createApplicationPresignedUrl_sessionExpirationDurationInSeconds :: Lens.Lens' CreateApplicationPresignedUrl (Prelude.Maybe Prelude.Natural)
createApplicationPresignedUrl_sessionExpirationDurationInSeconds :: (Maybe Natural -> f (Maybe Natural))
-> CreateApplicationPresignedUrl -> f CreateApplicationPresignedUrl
createApplicationPresignedUrl_sessionExpirationDurationInSeconds = (CreateApplicationPresignedUrl -> Maybe Natural)
-> (CreateApplicationPresignedUrl
    -> Maybe Natural -> CreateApplicationPresignedUrl)
-> Lens
     CreateApplicationPresignedUrl
     CreateApplicationPresignedUrl
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApplicationPresignedUrl' {Maybe Natural
sessionExpirationDurationInSeconds :: Maybe Natural
$sel:sessionExpirationDurationInSeconds:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> Maybe Natural
sessionExpirationDurationInSeconds} -> Maybe Natural
sessionExpirationDurationInSeconds) (\s :: CreateApplicationPresignedUrl
s@CreateApplicationPresignedUrl' {} Maybe Natural
a -> CreateApplicationPresignedUrl
s {$sel:sessionExpirationDurationInSeconds:CreateApplicationPresignedUrl' :: Maybe Natural
sessionExpirationDurationInSeconds = Maybe Natural
a} :: CreateApplicationPresignedUrl)

-- | The name of the application.
createApplicationPresignedUrl_applicationName :: Lens.Lens' CreateApplicationPresignedUrl Prelude.Text
createApplicationPresignedUrl_applicationName :: (Text -> f Text)
-> CreateApplicationPresignedUrl -> f CreateApplicationPresignedUrl
createApplicationPresignedUrl_applicationName = (CreateApplicationPresignedUrl -> Text)
-> (CreateApplicationPresignedUrl
    -> Text -> CreateApplicationPresignedUrl)
-> Lens
     CreateApplicationPresignedUrl
     CreateApplicationPresignedUrl
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApplicationPresignedUrl' {Text
applicationName :: Text
$sel:applicationName:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> Text
applicationName} -> Text
applicationName) (\s :: CreateApplicationPresignedUrl
s@CreateApplicationPresignedUrl' {} Text
a -> CreateApplicationPresignedUrl
s {$sel:applicationName:CreateApplicationPresignedUrl' :: Text
applicationName = Text
a} :: CreateApplicationPresignedUrl)

-- | The type of the extension for which to create and return a URL.
-- Currently, the only valid extension URL type is @FLINK_DASHBOARD_URL@.
createApplicationPresignedUrl_urlType :: Lens.Lens' CreateApplicationPresignedUrl UrlType
createApplicationPresignedUrl_urlType :: (UrlType -> f UrlType)
-> CreateApplicationPresignedUrl -> f CreateApplicationPresignedUrl
createApplicationPresignedUrl_urlType = (CreateApplicationPresignedUrl -> UrlType)
-> (CreateApplicationPresignedUrl
    -> UrlType -> CreateApplicationPresignedUrl)
-> Lens
     CreateApplicationPresignedUrl
     CreateApplicationPresignedUrl
     UrlType
     UrlType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApplicationPresignedUrl' {UrlType
urlType :: UrlType
$sel:urlType:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> UrlType
urlType} -> UrlType
urlType) (\s :: CreateApplicationPresignedUrl
s@CreateApplicationPresignedUrl' {} UrlType
a -> CreateApplicationPresignedUrl
s {$sel:urlType:CreateApplicationPresignedUrl' :: UrlType
urlType = UrlType
a} :: CreateApplicationPresignedUrl)

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

instance Prelude.NFData CreateApplicationPresignedUrl

instance Core.ToHeaders CreateApplicationPresignedUrl where
  toHeaders :: CreateApplicationPresignedUrl -> ResponseHeaders
toHeaders =
    ResponseHeaders -> CreateApplicationPresignedUrl -> 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
"KinesisAnalytics_20180523.CreateApplicationPresignedUrl" ::
                          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 CreateApplicationPresignedUrl where
  toJSON :: CreateApplicationPresignedUrl -> Value
toJSON CreateApplicationPresignedUrl' {Maybe Natural
Text
UrlType
urlType :: UrlType
applicationName :: Text
sessionExpirationDurationInSeconds :: Maybe Natural
$sel:urlType:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> UrlType
$sel:applicationName:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> Text
$sel:sessionExpirationDurationInSeconds:CreateApplicationPresignedUrl' :: CreateApplicationPresignedUrl -> 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,
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
              (Text
"ApplicationName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
applicationName),
            Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just (Text
"UrlType" Text -> UrlType -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= UrlType
urlType)
          ]
      )

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

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

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

-- |
-- Create a value of 'CreateApplicationPresignedUrlResponse' 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', 'createApplicationPresignedUrlResponse_authorizedUrl' - The URL of the extension.
--
-- 'httpStatus', 'createApplicationPresignedUrlResponse_httpStatus' - The response's http status code.
newCreateApplicationPresignedUrlResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  CreateApplicationPresignedUrlResponse
newCreateApplicationPresignedUrlResponse :: Int -> CreateApplicationPresignedUrlResponse
newCreateApplicationPresignedUrlResponse Int
pHttpStatus_ =
  CreateApplicationPresignedUrlResponse' :: Maybe Text -> Int -> CreateApplicationPresignedUrlResponse
CreateApplicationPresignedUrlResponse'
    { $sel:authorizedUrl:CreateApplicationPresignedUrlResponse' :: Maybe Text
authorizedUrl =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:CreateApplicationPresignedUrlResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The URL of the extension.
createApplicationPresignedUrlResponse_authorizedUrl :: Lens.Lens' CreateApplicationPresignedUrlResponse (Prelude.Maybe Prelude.Text)
createApplicationPresignedUrlResponse_authorizedUrl :: (Maybe Text -> f (Maybe Text))
-> CreateApplicationPresignedUrlResponse
-> f CreateApplicationPresignedUrlResponse
createApplicationPresignedUrlResponse_authorizedUrl = (CreateApplicationPresignedUrlResponse -> Maybe Text)
-> (CreateApplicationPresignedUrlResponse
    -> Maybe Text -> CreateApplicationPresignedUrlResponse)
-> Lens
     CreateApplicationPresignedUrlResponse
     CreateApplicationPresignedUrlResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateApplicationPresignedUrlResponse' {Maybe Text
authorizedUrl :: Maybe Text
$sel:authorizedUrl:CreateApplicationPresignedUrlResponse' :: CreateApplicationPresignedUrlResponse -> Maybe Text
authorizedUrl} -> Maybe Text
authorizedUrl) (\s :: CreateApplicationPresignedUrlResponse
s@CreateApplicationPresignedUrlResponse' {} Maybe Text
a -> CreateApplicationPresignedUrlResponse
s {$sel:authorizedUrl:CreateApplicationPresignedUrlResponse' :: Maybe Text
authorizedUrl = Maybe Text
a} :: CreateApplicationPresignedUrlResponse)

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

instance
  Prelude.NFData
    CreateApplicationPresignedUrlResponse