{-# 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.Lambda.GetFunctionUrlConfig
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns details about a Lambda function URL.
module Amazonka.Lambda.GetFunctionUrlConfig
  ( -- * Creating a Request
    GetFunctionUrlConfig (..),
    newGetFunctionUrlConfig,

    -- * Request Lenses
    getFunctionUrlConfig_qualifier,
    getFunctionUrlConfig_functionName,

    -- * Destructuring the Response
    GetFunctionUrlConfigResponse (..),
    newGetFunctionUrlConfigResponse,

    -- * Response Lenses
    getFunctionUrlConfigResponse_cors,
    getFunctionUrlConfigResponse_httpStatus,
    getFunctionUrlConfigResponse_functionUrl,
    getFunctionUrlConfigResponse_functionArn,
    getFunctionUrlConfigResponse_authType,
    getFunctionUrlConfigResponse_creationTime,
    getFunctionUrlConfigResponse_lastModifiedTime,
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import Amazonka.Lambda.Types
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

-- | /See:/ 'newGetFunctionUrlConfig' smart constructor.
data GetFunctionUrlConfig = GetFunctionUrlConfig'
  { -- | The alias name.
    GetFunctionUrlConfig -> Maybe Text
qualifier :: Prelude.Maybe Prelude.Text,
    -- | The name of the Lambda function.
    --
    -- __Name formats__
    --
    -- -   __Function name__ – @my-function@.
    --
    -- -   __Function ARN__ –
    --     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
    --
    -- -   __Partial ARN__ – @123456789012:function:my-function@.
    --
    -- The length constraint applies only to the full ARN. If you specify only
    -- the function name, it is limited to 64 characters in length.
    GetFunctionUrlConfig -> Text
functionName :: Prelude.Text
  }
  deriving (GetFunctionUrlConfig -> GetFunctionUrlConfig -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionUrlConfig -> GetFunctionUrlConfig -> Bool
$c/= :: GetFunctionUrlConfig -> GetFunctionUrlConfig -> Bool
== :: GetFunctionUrlConfig -> GetFunctionUrlConfig -> Bool
$c== :: GetFunctionUrlConfig -> GetFunctionUrlConfig -> Bool
Prelude.Eq, ReadPrec [GetFunctionUrlConfig]
ReadPrec GetFunctionUrlConfig
Int -> ReadS GetFunctionUrlConfig
ReadS [GetFunctionUrlConfig]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionUrlConfig]
$creadListPrec :: ReadPrec [GetFunctionUrlConfig]
readPrec :: ReadPrec GetFunctionUrlConfig
$creadPrec :: ReadPrec GetFunctionUrlConfig
readList :: ReadS [GetFunctionUrlConfig]
$creadList :: ReadS [GetFunctionUrlConfig]
readsPrec :: Int -> ReadS GetFunctionUrlConfig
$creadsPrec :: Int -> ReadS GetFunctionUrlConfig
Prelude.Read, Int -> GetFunctionUrlConfig -> ShowS
[GetFunctionUrlConfig] -> ShowS
GetFunctionUrlConfig -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionUrlConfig] -> ShowS
$cshowList :: [GetFunctionUrlConfig] -> ShowS
show :: GetFunctionUrlConfig -> String
$cshow :: GetFunctionUrlConfig -> String
showsPrec :: Int -> GetFunctionUrlConfig -> ShowS
$cshowsPrec :: Int -> GetFunctionUrlConfig -> ShowS
Prelude.Show, forall x. Rep GetFunctionUrlConfig x -> GetFunctionUrlConfig
forall x. GetFunctionUrlConfig -> Rep GetFunctionUrlConfig x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetFunctionUrlConfig x -> GetFunctionUrlConfig
$cfrom :: forall x. GetFunctionUrlConfig -> Rep GetFunctionUrlConfig x
Prelude.Generic)

-- |
-- Create a value of 'GetFunctionUrlConfig' 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:
--
-- 'qualifier', 'getFunctionUrlConfig_qualifier' - The alias name.
--
-- 'functionName', 'getFunctionUrlConfig_functionName' - The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ – @my-function@.
--
-- -   __Function ARN__ –
--     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
--
-- -   __Partial ARN__ – @123456789012:function:my-function@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
newGetFunctionUrlConfig ::
  -- | 'functionName'
  Prelude.Text ->
  GetFunctionUrlConfig
newGetFunctionUrlConfig :: Text -> GetFunctionUrlConfig
newGetFunctionUrlConfig Text
pFunctionName_ =
  GetFunctionUrlConfig'
    { $sel:qualifier:GetFunctionUrlConfig' :: Maybe Text
qualifier = forall a. Maybe a
Prelude.Nothing,
      $sel:functionName:GetFunctionUrlConfig' :: Text
functionName = Text
pFunctionName_
    }

-- | The alias name.
getFunctionUrlConfig_qualifier :: Lens.Lens' GetFunctionUrlConfig (Prelude.Maybe Prelude.Text)
getFunctionUrlConfig_qualifier :: Lens' GetFunctionUrlConfig (Maybe Text)
getFunctionUrlConfig_qualifier = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfig' {Maybe Text
qualifier :: Maybe Text
$sel:qualifier:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Maybe Text
qualifier} -> Maybe Text
qualifier) (\s :: GetFunctionUrlConfig
s@GetFunctionUrlConfig' {} Maybe Text
a -> GetFunctionUrlConfig
s {$sel:qualifier:GetFunctionUrlConfig' :: Maybe Text
qualifier = Maybe Text
a} :: GetFunctionUrlConfig)

-- | The name of the Lambda function.
--
-- __Name formats__
--
-- -   __Function name__ – @my-function@.
--
-- -   __Function ARN__ –
--     @arn:aws:lambda:us-west-2:123456789012:function:my-function@.
--
-- -   __Partial ARN__ – @123456789012:function:my-function@.
--
-- The length constraint applies only to the full ARN. If you specify only
-- the function name, it is limited to 64 characters in length.
getFunctionUrlConfig_functionName :: Lens.Lens' GetFunctionUrlConfig Prelude.Text
getFunctionUrlConfig_functionName :: Lens' GetFunctionUrlConfig Text
getFunctionUrlConfig_functionName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfig' {Text
functionName :: Text
$sel:functionName:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Text
functionName} -> Text
functionName) (\s :: GetFunctionUrlConfig
s@GetFunctionUrlConfig' {} Text
a -> GetFunctionUrlConfig
s {$sel:functionName:GetFunctionUrlConfig' :: Text
functionName = Text
a} :: GetFunctionUrlConfig)

instance Core.AWSRequest GetFunctionUrlConfig where
  type
    AWSResponse GetFunctionUrlConfig =
      GetFunctionUrlConfigResponse
  request :: (Service -> Service)
-> GetFunctionUrlConfig -> Request GetFunctionUrlConfig
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy GetFunctionUrlConfig
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetFunctionUrlConfig)))
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 ->
          Maybe Cors
-> Int
-> Text
-> Text
-> FunctionUrlAuthType
-> Text
-> Text
-> GetFunctionUrlConfigResponse
GetFunctionUrlConfigResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x forall a. FromJSON a => Object -> Key -> Either String (Maybe a)
Data..?> Key
"Cors")
            forall (f :: * -> *) a b. Applicative f => 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
"FunctionUrl")
            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
"FunctionArn")
            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
"AuthType")
            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
"CreationTime")
            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
"LastModifiedTime")
      )

instance Prelude.Hashable GetFunctionUrlConfig where
  hashWithSalt :: Int -> GetFunctionUrlConfig -> Int
hashWithSalt Int
_salt GetFunctionUrlConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Text
$sel:qualifier:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
qualifier
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
functionName

instance Prelude.NFData GetFunctionUrlConfig where
  rnf :: GetFunctionUrlConfig -> ()
rnf GetFunctionUrlConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Text
$sel:qualifier:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
qualifier
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionName

instance Data.ToHeaders GetFunctionUrlConfig where
  toHeaders :: GetFunctionUrlConfig -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

instance Data.ToPath GetFunctionUrlConfig where
  toPath :: GetFunctionUrlConfig -> ByteString
toPath GetFunctionUrlConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Text
$sel:qualifier:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2021-10-31/functions/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
functionName,
        ByteString
"/url"
      ]

instance Data.ToQuery GetFunctionUrlConfig where
  toQuery :: GetFunctionUrlConfig -> QueryString
toQuery GetFunctionUrlConfig' {Maybe Text
Text
functionName :: Text
qualifier :: Maybe Text
$sel:functionName:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Text
$sel:qualifier:GetFunctionUrlConfig' :: GetFunctionUrlConfig -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat [ByteString
"Qualifier" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
qualifier]

-- | /See:/ 'newGetFunctionUrlConfigResponse' smart constructor.
data GetFunctionUrlConfigResponse = GetFunctionUrlConfigResponse'
  { -- | The
    -- <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS cross-origin resource sharing (CORS)>
    -- settings for your function URL.
    GetFunctionUrlConfigResponse -> Maybe Cors
cors :: Prelude.Maybe Cors,
    -- | The response's http status code.
    GetFunctionUrlConfigResponse -> Int
httpStatus :: Prelude.Int,
    -- | The HTTP URL endpoint for your function.
    GetFunctionUrlConfigResponse -> Text
functionUrl :: Prelude.Text,
    -- | The Amazon Resource Name (ARN) of your function.
    GetFunctionUrlConfigResponse -> Text
functionArn :: Prelude.Text,
    -- | The type of authentication that your function URL uses. Set to @AWS_IAM@
    -- if you want to restrict access to authenticated IAM users only. Set to
    -- @NONE@ if you want to bypass IAM authentication to create a public
    -- endpoint. For more information, see
    -- <https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html Security and auth model for Lambda function URLs>.
    GetFunctionUrlConfigResponse -> FunctionUrlAuthType
authType :: FunctionUrlAuthType,
    -- | When the function URL was created, in
    -- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
    -- (YYYY-MM-DDThh:mm:ss.sTZD).
    GetFunctionUrlConfigResponse -> Text
creationTime :: Prelude.Text,
    -- | When the function URL configuration was last updated, in
    -- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
    -- (YYYY-MM-DDThh:mm:ss.sTZD).
    GetFunctionUrlConfigResponse -> Text
lastModifiedTime :: Prelude.Text
  }
  deriving (GetFunctionUrlConfigResponse
-> GetFunctionUrlConfigResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetFunctionUrlConfigResponse
-> GetFunctionUrlConfigResponse -> Bool
$c/= :: GetFunctionUrlConfigResponse
-> GetFunctionUrlConfigResponse -> Bool
== :: GetFunctionUrlConfigResponse
-> GetFunctionUrlConfigResponse -> Bool
$c== :: GetFunctionUrlConfigResponse
-> GetFunctionUrlConfigResponse -> Bool
Prelude.Eq, ReadPrec [GetFunctionUrlConfigResponse]
ReadPrec GetFunctionUrlConfigResponse
Int -> ReadS GetFunctionUrlConfigResponse
ReadS [GetFunctionUrlConfigResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetFunctionUrlConfigResponse]
$creadListPrec :: ReadPrec [GetFunctionUrlConfigResponse]
readPrec :: ReadPrec GetFunctionUrlConfigResponse
$creadPrec :: ReadPrec GetFunctionUrlConfigResponse
readList :: ReadS [GetFunctionUrlConfigResponse]
$creadList :: ReadS [GetFunctionUrlConfigResponse]
readsPrec :: Int -> ReadS GetFunctionUrlConfigResponse
$creadsPrec :: Int -> ReadS GetFunctionUrlConfigResponse
Prelude.Read, Int -> GetFunctionUrlConfigResponse -> ShowS
[GetFunctionUrlConfigResponse] -> ShowS
GetFunctionUrlConfigResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetFunctionUrlConfigResponse] -> ShowS
$cshowList :: [GetFunctionUrlConfigResponse] -> ShowS
show :: GetFunctionUrlConfigResponse -> String
$cshow :: GetFunctionUrlConfigResponse -> String
showsPrec :: Int -> GetFunctionUrlConfigResponse -> ShowS
$cshowsPrec :: Int -> GetFunctionUrlConfigResponse -> ShowS
Prelude.Show, forall x.
Rep GetFunctionUrlConfigResponse x -> GetFunctionUrlConfigResponse
forall x.
GetFunctionUrlConfigResponse -> Rep GetFunctionUrlConfigResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetFunctionUrlConfigResponse x -> GetFunctionUrlConfigResponse
$cfrom :: forall x.
GetFunctionUrlConfigResponse -> Rep GetFunctionUrlConfigResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetFunctionUrlConfigResponse' 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:
--
-- 'cors', 'getFunctionUrlConfigResponse_cors' - The
-- <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS cross-origin resource sharing (CORS)>
-- settings for your function URL.
--
-- 'httpStatus', 'getFunctionUrlConfigResponse_httpStatus' - The response's http status code.
--
-- 'functionUrl', 'getFunctionUrlConfigResponse_functionUrl' - The HTTP URL endpoint for your function.
--
-- 'functionArn', 'getFunctionUrlConfigResponse_functionArn' - The Amazon Resource Name (ARN) of your function.
--
-- 'authType', 'getFunctionUrlConfigResponse_authType' - The type of authentication that your function URL uses. Set to @AWS_IAM@
-- if you want to restrict access to authenticated IAM users only. Set to
-- @NONE@ if you want to bypass IAM authentication to create a public
-- endpoint. For more information, see
-- <https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html Security and auth model for Lambda function URLs>.
--
-- 'creationTime', 'getFunctionUrlConfigResponse_creationTime' - When the function URL was created, in
-- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
-- (YYYY-MM-DDThh:mm:ss.sTZD).
--
-- 'lastModifiedTime', 'getFunctionUrlConfigResponse_lastModifiedTime' - When the function URL configuration was last updated, in
-- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
-- (YYYY-MM-DDThh:mm:ss.sTZD).
newGetFunctionUrlConfigResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'functionUrl'
  Prelude.Text ->
  -- | 'functionArn'
  Prelude.Text ->
  -- | 'authType'
  FunctionUrlAuthType ->
  -- | 'creationTime'
  Prelude.Text ->
  -- | 'lastModifiedTime'
  Prelude.Text ->
  GetFunctionUrlConfigResponse
newGetFunctionUrlConfigResponse :: Int
-> Text
-> Text
-> FunctionUrlAuthType
-> Text
-> Text
-> GetFunctionUrlConfigResponse
newGetFunctionUrlConfigResponse
  Int
pHttpStatus_
  Text
pFunctionUrl_
  Text
pFunctionArn_
  FunctionUrlAuthType
pAuthType_
  Text
pCreationTime_
  Text
pLastModifiedTime_ =
    GetFunctionUrlConfigResponse'
      { $sel:cors:GetFunctionUrlConfigResponse' :: Maybe Cors
cors =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetFunctionUrlConfigResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:functionUrl:GetFunctionUrlConfigResponse' :: Text
functionUrl = Text
pFunctionUrl_,
        $sel:functionArn:GetFunctionUrlConfigResponse' :: Text
functionArn = Text
pFunctionArn_,
        $sel:authType:GetFunctionUrlConfigResponse' :: FunctionUrlAuthType
authType = FunctionUrlAuthType
pAuthType_,
        $sel:creationTime:GetFunctionUrlConfigResponse' :: Text
creationTime = Text
pCreationTime_,
        $sel:lastModifiedTime:GetFunctionUrlConfigResponse' :: Text
lastModifiedTime = Text
pLastModifiedTime_
      }

-- | The
-- <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS cross-origin resource sharing (CORS)>
-- settings for your function URL.
getFunctionUrlConfigResponse_cors :: Lens.Lens' GetFunctionUrlConfigResponse (Prelude.Maybe Cors)
getFunctionUrlConfigResponse_cors :: Lens' GetFunctionUrlConfigResponse (Maybe Cors)
getFunctionUrlConfigResponse_cors = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {Maybe Cors
cors :: Maybe Cors
$sel:cors:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Maybe Cors
cors} -> Maybe Cors
cors) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} Maybe Cors
a -> GetFunctionUrlConfigResponse
s {$sel:cors:GetFunctionUrlConfigResponse' :: Maybe Cors
cors = Maybe Cors
a} :: GetFunctionUrlConfigResponse)

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

-- | The HTTP URL endpoint for your function.
getFunctionUrlConfigResponse_functionUrl :: Lens.Lens' GetFunctionUrlConfigResponse Prelude.Text
getFunctionUrlConfigResponse_functionUrl :: Lens' GetFunctionUrlConfigResponse Text
getFunctionUrlConfigResponse_functionUrl = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {Text
functionUrl :: Text
$sel:functionUrl:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
functionUrl} -> Text
functionUrl) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} Text
a -> GetFunctionUrlConfigResponse
s {$sel:functionUrl:GetFunctionUrlConfigResponse' :: Text
functionUrl = Text
a} :: GetFunctionUrlConfigResponse)

-- | The Amazon Resource Name (ARN) of your function.
getFunctionUrlConfigResponse_functionArn :: Lens.Lens' GetFunctionUrlConfigResponse Prelude.Text
getFunctionUrlConfigResponse_functionArn :: Lens' GetFunctionUrlConfigResponse Text
getFunctionUrlConfigResponse_functionArn = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {Text
functionArn :: Text
$sel:functionArn:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
functionArn} -> Text
functionArn) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} Text
a -> GetFunctionUrlConfigResponse
s {$sel:functionArn:GetFunctionUrlConfigResponse' :: Text
functionArn = Text
a} :: GetFunctionUrlConfigResponse)

-- | The type of authentication that your function URL uses. Set to @AWS_IAM@
-- if you want to restrict access to authenticated IAM users only. Set to
-- @NONE@ if you want to bypass IAM authentication to create a public
-- endpoint. For more information, see
-- <https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html Security and auth model for Lambda function URLs>.
getFunctionUrlConfigResponse_authType :: Lens.Lens' GetFunctionUrlConfigResponse FunctionUrlAuthType
getFunctionUrlConfigResponse_authType :: Lens' GetFunctionUrlConfigResponse FunctionUrlAuthType
getFunctionUrlConfigResponse_authType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {FunctionUrlAuthType
authType :: FunctionUrlAuthType
$sel:authType:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> FunctionUrlAuthType
authType} -> FunctionUrlAuthType
authType) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} FunctionUrlAuthType
a -> GetFunctionUrlConfigResponse
s {$sel:authType:GetFunctionUrlConfigResponse' :: FunctionUrlAuthType
authType = FunctionUrlAuthType
a} :: GetFunctionUrlConfigResponse)

-- | When the function URL was created, in
-- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
-- (YYYY-MM-DDThh:mm:ss.sTZD).
getFunctionUrlConfigResponse_creationTime :: Lens.Lens' GetFunctionUrlConfigResponse Prelude.Text
getFunctionUrlConfigResponse_creationTime :: Lens' GetFunctionUrlConfigResponse Text
getFunctionUrlConfigResponse_creationTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {Text
creationTime :: Text
$sel:creationTime:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
creationTime} -> Text
creationTime) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} Text
a -> GetFunctionUrlConfigResponse
s {$sel:creationTime:GetFunctionUrlConfigResponse' :: Text
creationTime = Text
a} :: GetFunctionUrlConfigResponse)

-- | When the function URL configuration was last updated, in
-- <https://www.w3.org/TR/NOTE-datetime ISO-8601 format>
-- (YYYY-MM-DDThh:mm:ss.sTZD).
getFunctionUrlConfigResponse_lastModifiedTime :: Lens.Lens' GetFunctionUrlConfigResponse Prelude.Text
getFunctionUrlConfigResponse_lastModifiedTime :: Lens' GetFunctionUrlConfigResponse Text
getFunctionUrlConfigResponse_lastModifiedTime = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetFunctionUrlConfigResponse' {Text
lastModifiedTime :: Text
$sel:lastModifiedTime:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
lastModifiedTime} -> Text
lastModifiedTime) (\s :: GetFunctionUrlConfigResponse
s@GetFunctionUrlConfigResponse' {} Text
a -> GetFunctionUrlConfigResponse
s {$sel:lastModifiedTime:GetFunctionUrlConfigResponse' :: Text
lastModifiedTime = Text
a} :: GetFunctionUrlConfigResponse)

instance Prelude.NFData GetFunctionUrlConfigResponse where
  rnf :: GetFunctionUrlConfigResponse -> ()
rnf GetFunctionUrlConfigResponse' {Int
Maybe Cors
Text
FunctionUrlAuthType
lastModifiedTime :: Text
creationTime :: Text
authType :: FunctionUrlAuthType
functionArn :: Text
functionUrl :: Text
httpStatus :: Int
cors :: Maybe Cors
$sel:lastModifiedTime:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
$sel:creationTime:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
$sel:authType:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> FunctionUrlAuthType
$sel:functionArn:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
$sel:functionUrl:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Text
$sel:httpStatus:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Int
$sel:cors:GetFunctionUrlConfigResponse' :: GetFunctionUrlConfigResponse -> Maybe Cors
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Cors
cors
      seq :: forall a b. a -> b -> b
`Prelude.seq` 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
functionUrl
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
functionArn
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf FunctionUrlAuthType
authType
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
creationTime
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
lastModifiedTime