{-# 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.FinSpaceData.GetProgrammaticAccessCredentials
-- 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)
--
-- Request programmatic credentials to use with Habanero SDK.
module Amazonka.FinSpaceData.GetProgrammaticAccessCredentials
  ( -- * Creating a Request
    GetProgrammaticAccessCredentials (..),
    newGetProgrammaticAccessCredentials,

    -- * Request Lenses
    getProgrammaticAccessCredentials_durationInMinutes,
    getProgrammaticAccessCredentials_environmentId,

    -- * Destructuring the Response
    GetProgrammaticAccessCredentialsResponse (..),
    newGetProgrammaticAccessCredentialsResponse,

    -- * Response Lenses
    getProgrammaticAccessCredentialsResponse_credentials,
    getProgrammaticAccessCredentialsResponse_durationInMinutes,
    getProgrammaticAccessCredentialsResponse_httpStatus,
  )
where

import qualified Amazonka.Core as Core
import Amazonka.FinSpaceData.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:/ 'newGetProgrammaticAccessCredentials' smart constructor.
data GetProgrammaticAccessCredentials = GetProgrammaticAccessCredentials'
  { -- | The time duration in which the credentials remain valid.
    GetProgrammaticAccessCredentials -> Maybe Natural
durationInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | The habanero environment identifier.
    GetProgrammaticAccessCredentials -> Text
environmentId :: Prelude.Text
  }
  deriving (GetProgrammaticAccessCredentials
-> GetProgrammaticAccessCredentials -> Bool
(GetProgrammaticAccessCredentials
 -> GetProgrammaticAccessCredentials -> Bool)
-> (GetProgrammaticAccessCredentials
    -> GetProgrammaticAccessCredentials -> Bool)
-> Eq GetProgrammaticAccessCredentials
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetProgrammaticAccessCredentials
-> GetProgrammaticAccessCredentials -> Bool
$c/= :: GetProgrammaticAccessCredentials
-> GetProgrammaticAccessCredentials -> Bool
== :: GetProgrammaticAccessCredentials
-> GetProgrammaticAccessCredentials -> Bool
$c== :: GetProgrammaticAccessCredentials
-> GetProgrammaticAccessCredentials -> Bool
Prelude.Eq, ReadPrec [GetProgrammaticAccessCredentials]
ReadPrec GetProgrammaticAccessCredentials
Int -> ReadS GetProgrammaticAccessCredentials
ReadS [GetProgrammaticAccessCredentials]
(Int -> ReadS GetProgrammaticAccessCredentials)
-> ReadS [GetProgrammaticAccessCredentials]
-> ReadPrec GetProgrammaticAccessCredentials
-> ReadPrec [GetProgrammaticAccessCredentials]
-> Read GetProgrammaticAccessCredentials
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetProgrammaticAccessCredentials]
$creadListPrec :: ReadPrec [GetProgrammaticAccessCredentials]
readPrec :: ReadPrec GetProgrammaticAccessCredentials
$creadPrec :: ReadPrec GetProgrammaticAccessCredentials
readList :: ReadS [GetProgrammaticAccessCredentials]
$creadList :: ReadS [GetProgrammaticAccessCredentials]
readsPrec :: Int -> ReadS GetProgrammaticAccessCredentials
$creadsPrec :: Int -> ReadS GetProgrammaticAccessCredentials
Prelude.Read, Int -> GetProgrammaticAccessCredentials -> ShowS
[GetProgrammaticAccessCredentials] -> ShowS
GetProgrammaticAccessCredentials -> String
(Int -> GetProgrammaticAccessCredentials -> ShowS)
-> (GetProgrammaticAccessCredentials -> String)
-> ([GetProgrammaticAccessCredentials] -> ShowS)
-> Show GetProgrammaticAccessCredentials
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetProgrammaticAccessCredentials] -> ShowS
$cshowList :: [GetProgrammaticAccessCredentials] -> ShowS
show :: GetProgrammaticAccessCredentials -> String
$cshow :: GetProgrammaticAccessCredentials -> String
showsPrec :: Int -> GetProgrammaticAccessCredentials -> ShowS
$cshowsPrec :: Int -> GetProgrammaticAccessCredentials -> ShowS
Prelude.Show, (forall x.
 GetProgrammaticAccessCredentials
 -> Rep GetProgrammaticAccessCredentials x)
-> (forall x.
    Rep GetProgrammaticAccessCredentials x
    -> GetProgrammaticAccessCredentials)
-> Generic GetProgrammaticAccessCredentials
forall x.
Rep GetProgrammaticAccessCredentials x
-> GetProgrammaticAccessCredentials
forall x.
GetProgrammaticAccessCredentials
-> Rep GetProgrammaticAccessCredentials x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetProgrammaticAccessCredentials x
-> GetProgrammaticAccessCredentials
$cfrom :: forall x.
GetProgrammaticAccessCredentials
-> Rep GetProgrammaticAccessCredentials x
Prelude.Generic)

-- |
-- Create a value of 'GetProgrammaticAccessCredentials' 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:
--
-- 'durationInMinutes', 'getProgrammaticAccessCredentials_durationInMinutes' - The time duration in which the credentials remain valid.
--
-- 'environmentId', 'getProgrammaticAccessCredentials_environmentId' - The habanero environment identifier.
newGetProgrammaticAccessCredentials ::
  -- | 'environmentId'
  Prelude.Text ->
  GetProgrammaticAccessCredentials
newGetProgrammaticAccessCredentials :: Text -> GetProgrammaticAccessCredentials
newGetProgrammaticAccessCredentials Text
pEnvironmentId_ =
  GetProgrammaticAccessCredentials' :: Maybe Natural -> Text -> GetProgrammaticAccessCredentials
GetProgrammaticAccessCredentials'
    { $sel:durationInMinutes:GetProgrammaticAccessCredentials' :: Maybe Natural
durationInMinutes =
        Maybe Natural
forall a. Maybe a
Prelude.Nothing,
      $sel:environmentId:GetProgrammaticAccessCredentials' :: Text
environmentId = Text
pEnvironmentId_
    }

-- | The time duration in which the credentials remain valid.
getProgrammaticAccessCredentials_durationInMinutes :: Lens.Lens' GetProgrammaticAccessCredentials (Prelude.Maybe Prelude.Natural)
getProgrammaticAccessCredentials_durationInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> GetProgrammaticAccessCredentials
-> f GetProgrammaticAccessCredentials
getProgrammaticAccessCredentials_durationInMinutes = (GetProgrammaticAccessCredentials -> Maybe Natural)
-> (GetProgrammaticAccessCredentials
    -> Maybe Natural -> GetProgrammaticAccessCredentials)
-> Lens
     GetProgrammaticAccessCredentials
     GetProgrammaticAccessCredentials
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetProgrammaticAccessCredentials' {Maybe Natural
durationInMinutes :: Maybe Natural
$sel:durationInMinutes:GetProgrammaticAccessCredentials' :: GetProgrammaticAccessCredentials -> Maybe Natural
durationInMinutes} -> Maybe Natural
durationInMinutes) (\s :: GetProgrammaticAccessCredentials
s@GetProgrammaticAccessCredentials' {} Maybe Natural
a -> GetProgrammaticAccessCredentials
s {$sel:durationInMinutes:GetProgrammaticAccessCredentials' :: Maybe Natural
durationInMinutes = Maybe Natural
a} :: GetProgrammaticAccessCredentials)

-- | The habanero environment identifier.
getProgrammaticAccessCredentials_environmentId :: Lens.Lens' GetProgrammaticAccessCredentials Prelude.Text
getProgrammaticAccessCredentials_environmentId :: (Text -> f Text)
-> GetProgrammaticAccessCredentials
-> f GetProgrammaticAccessCredentials
getProgrammaticAccessCredentials_environmentId = (GetProgrammaticAccessCredentials -> Text)
-> (GetProgrammaticAccessCredentials
    -> Text -> GetProgrammaticAccessCredentials)
-> Lens
     GetProgrammaticAccessCredentials
     GetProgrammaticAccessCredentials
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetProgrammaticAccessCredentials' {Text
environmentId :: Text
$sel:environmentId:GetProgrammaticAccessCredentials' :: GetProgrammaticAccessCredentials -> Text
environmentId} -> Text
environmentId) (\s :: GetProgrammaticAccessCredentials
s@GetProgrammaticAccessCredentials' {} Text
a -> GetProgrammaticAccessCredentials
s {$sel:environmentId:GetProgrammaticAccessCredentials' :: Text
environmentId = Text
a} :: GetProgrammaticAccessCredentials)

instance
  Core.AWSRequest
    GetProgrammaticAccessCredentials
  where
  type
    AWSResponse GetProgrammaticAccessCredentials =
      GetProgrammaticAccessCredentialsResponse
  request :: GetProgrammaticAccessCredentials
-> Request GetProgrammaticAccessCredentials
request = Service
-> GetProgrammaticAccessCredentials
-> Request GetProgrammaticAccessCredentials
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy GetProgrammaticAccessCredentials
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetProgrammaticAccessCredentials)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse GetProgrammaticAccessCredentials))
-> Logger
-> Service
-> Proxy GetProgrammaticAccessCredentials
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetProgrammaticAccessCredentials)))
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 Credentials
-> Maybe Natural -> Int -> GetProgrammaticAccessCredentialsResponse
GetProgrammaticAccessCredentialsResponse'
            (Maybe Credentials
 -> Maybe Natural
 -> Int
 -> GetProgrammaticAccessCredentialsResponse)
-> Either String (Maybe Credentials)
-> Either
     String
     (Maybe Natural -> Int -> GetProgrammaticAccessCredentialsResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe Credentials)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"credentials")
            Either
  String
  (Maybe Natural -> Int -> GetProgrammaticAccessCredentialsResponse)
-> Either String (Maybe Natural)
-> Either String (Int -> GetProgrammaticAccessCredentialsResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe Natural)
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"durationInMinutes")
            Either String (Int -> GetProgrammaticAccessCredentialsResponse)
-> Either String Int
-> Either String GetProgrammaticAccessCredentialsResponse
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
    GetProgrammaticAccessCredentials

instance
  Prelude.NFData
    GetProgrammaticAccessCredentials

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

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

instance
  Core.ToQuery
    GetProgrammaticAccessCredentials
  where
  toQuery :: GetProgrammaticAccessCredentials -> QueryString
toQuery GetProgrammaticAccessCredentials' {Maybe Natural
Text
environmentId :: Text
durationInMinutes :: Maybe Natural
$sel:environmentId:GetProgrammaticAccessCredentials' :: GetProgrammaticAccessCredentials -> Text
$sel:durationInMinutes:GetProgrammaticAccessCredentials' :: GetProgrammaticAccessCredentials -> Maybe Natural
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"durationInMinutes" ByteString -> Maybe Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Natural
durationInMinutes,
        ByteString
"environmentId" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
environmentId
      ]

-- | /See:/ 'newGetProgrammaticAccessCredentialsResponse' smart constructor.
data GetProgrammaticAccessCredentialsResponse = GetProgrammaticAccessCredentialsResponse'
  { -- | Returns the programmatic credentials.
    GetProgrammaticAccessCredentialsResponse -> Maybe Credentials
credentials :: Prelude.Maybe Credentials,
    -- | Returns the duration in which the credentials will remain valid.
    GetProgrammaticAccessCredentialsResponse -> Maybe Natural
durationInMinutes :: Prelude.Maybe Prelude.Natural,
    -- | The response's http status code.
    GetProgrammaticAccessCredentialsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetProgrammaticAccessCredentialsResponse
-> GetProgrammaticAccessCredentialsResponse -> Bool
(GetProgrammaticAccessCredentialsResponse
 -> GetProgrammaticAccessCredentialsResponse -> Bool)
-> (GetProgrammaticAccessCredentialsResponse
    -> GetProgrammaticAccessCredentialsResponse -> Bool)
-> Eq GetProgrammaticAccessCredentialsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetProgrammaticAccessCredentialsResponse
-> GetProgrammaticAccessCredentialsResponse -> Bool
$c/= :: GetProgrammaticAccessCredentialsResponse
-> GetProgrammaticAccessCredentialsResponse -> Bool
== :: GetProgrammaticAccessCredentialsResponse
-> GetProgrammaticAccessCredentialsResponse -> Bool
$c== :: GetProgrammaticAccessCredentialsResponse
-> GetProgrammaticAccessCredentialsResponse -> Bool
Prelude.Eq, ReadPrec [GetProgrammaticAccessCredentialsResponse]
ReadPrec GetProgrammaticAccessCredentialsResponse
Int -> ReadS GetProgrammaticAccessCredentialsResponse
ReadS [GetProgrammaticAccessCredentialsResponse]
(Int -> ReadS GetProgrammaticAccessCredentialsResponse)
-> ReadS [GetProgrammaticAccessCredentialsResponse]
-> ReadPrec GetProgrammaticAccessCredentialsResponse
-> ReadPrec [GetProgrammaticAccessCredentialsResponse]
-> Read GetProgrammaticAccessCredentialsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetProgrammaticAccessCredentialsResponse]
$creadListPrec :: ReadPrec [GetProgrammaticAccessCredentialsResponse]
readPrec :: ReadPrec GetProgrammaticAccessCredentialsResponse
$creadPrec :: ReadPrec GetProgrammaticAccessCredentialsResponse
readList :: ReadS [GetProgrammaticAccessCredentialsResponse]
$creadList :: ReadS [GetProgrammaticAccessCredentialsResponse]
readsPrec :: Int -> ReadS GetProgrammaticAccessCredentialsResponse
$creadsPrec :: Int -> ReadS GetProgrammaticAccessCredentialsResponse
Prelude.Read, Int -> GetProgrammaticAccessCredentialsResponse -> ShowS
[GetProgrammaticAccessCredentialsResponse] -> ShowS
GetProgrammaticAccessCredentialsResponse -> String
(Int -> GetProgrammaticAccessCredentialsResponse -> ShowS)
-> (GetProgrammaticAccessCredentialsResponse -> String)
-> ([GetProgrammaticAccessCredentialsResponse] -> ShowS)
-> Show GetProgrammaticAccessCredentialsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetProgrammaticAccessCredentialsResponse] -> ShowS
$cshowList :: [GetProgrammaticAccessCredentialsResponse] -> ShowS
show :: GetProgrammaticAccessCredentialsResponse -> String
$cshow :: GetProgrammaticAccessCredentialsResponse -> String
showsPrec :: Int -> GetProgrammaticAccessCredentialsResponse -> ShowS
$cshowsPrec :: Int -> GetProgrammaticAccessCredentialsResponse -> ShowS
Prelude.Show, (forall x.
 GetProgrammaticAccessCredentialsResponse
 -> Rep GetProgrammaticAccessCredentialsResponse x)
-> (forall x.
    Rep GetProgrammaticAccessCredentialsResponse x
    -> GetProgrammaticAccessCredentialsResponse)
-> Generic GetProgrammaticAccessCredentialsResponse
forall x.
Rep GetProgrammaticAccessCredentialsResponse x
-> GetProgrammaticAccessCredentialsResponse
forall x.
GetProgrammaticAccessCredentialsResponse
-> Rep GetProgrammaticAccessCredentialsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetProgrammaticAccessCredentialsResponse x
-> GetProgrammaticAccessCredentialsResponse
$cfrom :: forall x.
GetProgrammaticAccessCredentialsResponse
-> Rep GetProgrammaticAccessCredentialsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetProgrammaticAccessCredentialsResponse' 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:
--
-- 'credentials', 'getProgrammaticAccessCredentialsResponse_credentials' - Returns the programmatic credentials.
--
-- 'durationInMinutes', 'getProgrammaticAccessCredentialsResponse_durationInMinutes' - Returns the duration in which the credentials will remain valid.
--
-- 'httpStatus', 'getProgrammaticAccessCredentialsResponse_httpStatus' - The response's http status code.
newGetProgrammaticAccessCredentialsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetProgrammaticAccessCredentialsResponse
newGetProgrammaticAccessCredentialsResponse :: Int -> GetProgrammaticAccessCredentialsResponse
newGetProgrammaticAccessCredentialsResponse
  Int
pHttpStatus_ =
    GetProgrammaticAccessCredentialsResponse' :: Maybe Credentials
-> Maybe Natural -> Int -> GetProgrammaticAccessCredentialsResponse
GetProgrammaticAccessCredentialsResponse'
      { $sel:credentials:GetProgrammaticAccessCredentialsResponse' :: Maybe Credentials
credentials =
          Maybe Credentials
forall a. Maybe a
Prelude.Nothing,
        $sel:durationInMinutes:GetProgrammaticAccessCredentialsResponse' :: Maybe Natural
durationInMinutes =
          Maybe Natural
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetProgrammaticAccessCredentialsResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | Returns the programmatic credentials.
getProgrammaticAccessCredentialsResponse_credentials :: Lens.Lens' GetProgrammaticAccessCredentialsResponse (Prelude.Maybe Credentials)
getProgrammaticAccessCredentialsResponse_credentials :: (Maybe Credentials -> f (Maybe Credentials))
-> GetProgrammaticAccessCredentialsResponse
-> f GetProgrammaticAccessCredentialsResponse
getProgrammaticAccessCredentialsResponse_credentials = (GetProgrammaticAccessCredentialsResponse -> Maybe Credentials)
-> (GetProgrammaticAccessCredentialsResponse
    -> Maybe Credentials -> GetProgrammaticAccessCredentialsResponse)
-> Lens
     GetProgrammaticAccessCredentialsResponse
     GetProgrammaticAccessCredentialsResponse
     (Maybe Credentials)
     (Maybe Credentials)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetProgrammaticAccessCredentialsResponse' {Maybe Credentials
credentials :: Maybe Credentials
$sel:credentials:GetProgrammaticAccessCredentialsResponse' :: GetProgrammaticAccessCredentialsResponse -> Maybe Credentials
credentials} -> Maybe Credentials
credentials) (\s :: GetProgrammaticAccessCredentialsResponse
s@GetProgrammaticAccessCredentialsResponse' {} Maybe Credentials
a -> GetProgrammaticAccessCredentialsResponse
s {$sel:credentials:GetProgrammaticAccessCredentialsResponse' :: Maybe Credentials
credentials = Maybe Credentials
a} :: GetProgrammaticAccessCredentialsResponse)

-- | Returns the duration in which the credentials will remain valid.
getProgrammaticAccessCredentialsResponse_durationInMinutes :: Lens.Lens' GetProgrammaticAccessCredentialsResponse (Prelude.Maybe Prelude.Natural)
getProgrammaticAccessCredentialsResponse_durationInMinutes :: (Maybe Natural -> f (Maybe Natural))
-> GetProgrammaticAccessCredentialsResponse
-> f GetProgrammaticAccessCredentialsResponse
getProgrammaticAccessCredentialsResponse_durationInMinutes = (GetProgrammaticAccessCredentialsResponse -> Maybe Natural)
-> (GetProgrammaticAccessCredentialsResponse
    -> Maybe Natural -> GetProgrammaticAccessCredentialsResponse)
-> Lens
     GetProgrammaticAccessCredentialsResponse
     GetProgrammaticAccessCredentialsResponse
     (Maybe Natural)
     (Maybe Natural)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetProgrammaticAccessCredentialsResponse' {Maybe Natural
durationInMinutes :: Maybe Natural
$sel:durationInMinutes:GetProgrammaticAccessCredentialsResponse' :: GetProgrammaticAccessCredentialsResponse -> Maybe Natural
durationInMinutes} -> Maybe Natural
durationInMinutes) (\s :: GetProgrammaticAccessCredentialsResponse
s@GetProgrammaticAccessCredentialsResponse' {} Maybe Natural
a -> GetProgrammaticAccessCredentialsResponse
s {$sel:durationInMinutes:GetProgrammaticAccessCredentialsResponse' :: Maybe Natural
durationInMinutes = Maybe Natural
a} :: GetProgrammaticAccessCredentialsResponse)

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

instance
  Prelude.NFData
    GetProgrammaticAccessCredentialsResponse