{-# 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.APIGateway.ImportApiKeys
-- 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)
--
-- Import API keys from an external source, such as a CSV-formatted file.
module Amazonka.APIGateway.ImportApiKeys
  ( -- * Creating a Request
    ImportApiKeys (..),
    newImportApiKeys,

    -- * Request Lenses
    importApiKeys_failOnWarnings,
    importApiKeys_body,
    importApiKeys_format,

    -- * Destructuring the Response
    ImportApiKeysResponse (..),
    newImportApiKeysResponse,

    -- * Response Lenses
    importApiKeysResponse_ids,
    importApiKeysResponse_warnings,
    importApiKeysResponse_httpStatus,
  )
where

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

-- | The POST request to import API keys from an external source, such as a
-- CSV-formatted file.
--
-- /See:/ 'newImportApiKeys' smart constructor.
data ImportApiKeys = ImportApiKeys'
  { -- | A query parameter to indicate whether to rollback ApiKey importation
    -- (@true@) or not (@false@) when error is encountered.
    ImportApiKeys -> Maybe Bool
failOnWarnings :: Prelude.Maybe Prelude.Bool,
    -- | The payload of the POST request to import API keys. For the payload
    -- format, see
    -- <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html API Key File Format>.
    ImportApiKeys -> ByteString
body :: Prelude.ByteString,
    -- | A query parameter to specify the input format to imported API keys.
    -- Currently, only the @csv@ format is supported.
    ImportApiKeys -> ApiKeysFormat
format :: ApiKeysFormat
  }
  deriving (ImportApiKeys -> ImportApiKeys -> Bool
(ImportApiKeys -> ImportApiKeys -> Bool)
-> (ImportApiKeys -> ImportApiKeys -> Bool) -> Eq ImportApiKeys
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportApiKeys -> ImportApiKeys -> Bool
$c/= :: ImportApiKeys -> ImportApiKeys -> Bool
== :: ImportApiKeys -> ImportApiKeys -> Bool
$c== :: ImportApiKeys -> ImportApiKeys -> Bool
Prelude.Eq, Int -> ImportApiKeys -> ShowS
[ImportApiKeys] -> ShowS
ImportApiKeys -> String
(Int -> ImportApiKeys -> ShowS)
-> (ImportApiKeys -> String)
-> ([ImportApiKeys] -> ShowS)
-> Show ImportApiKeys
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportApiKeys] -> ShowS
$cshowList :: [ImportApiKeys] -> ShowS
show :: ImportApiKeys -> String
$cshow :: ImportApiKeys -> String
showsPrec :: Int -> ImportApiKeys -> ShowS
$cshowsPrec :: Int -> ImportApiKeys -> ShowS
Prelude.Show, (forall x. ImportApiKeys -> Rep ImportApiKeys x)
-> (forall x. Rep ImportApiKeys x -> ImportApiKeys)
-> Generic ImportApiKeys
forall x. Rep ImportApiKeys x -> ImportApiKeys
forall x. ImportApiKeys -> Rep ImportApiKeys x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportApiKeys x -> ImportApiKeys
$cfrom :: forall x. ImportApiKeys -> Rep ImportApiKeys x
Prelude.Generic)

-- |
-- Create a value of 'ImportApiKeys' 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:
--
-- 'failOnWarnings', 'importApiKeys_failOnWarnings' - A query parameter to indicate whether to rollback ApiKey importation
-- (@true@) or not (@false@) when error is encountered.
--
-- 'body', 'importApiKeys_body' - The payload of the POST request to import API keys. For the payload
-- format, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html API Key File Format>.
--
-- 'format', 'importApiKeys_format' - A query parameter to specify the input format to imported API keys.
-- Currently, only the @csv@ format is supported.
newImportApiKeys ::
  -- | 'body'
  Prelude.ByteString ->
  -- | 'format'
  ApiKeysFormat ->
  ImportApiKeys
newImportApiKeys :: ByteString -> ApiKeysFormat -> ImportApiKeys
newImportApiKeys ByteString
pBody_ ApiKeysFormat
pFormat_ =
  ImportApiKeys' :: Maybe Bool -> ByteString -> ApiKeysFormat -> ImportApiKeys
ImportApiKeys'
    { $sel:failOnWarnings:ImportApiKeys' :: Maybe Bool
failOnWarnings = Maybe Bool
forall a. Maybe a
Prelude.Nothing,
      $sel:body:ImportApiKeys' :: ByteString
body = ByteString
pBody_,
      $sel:format:ImportApiKeys' :: ApiKeysFormat
format = ApiKeysFormat
pFormat_
    }

-- | A query parameter to indicate whether to rollback ApiKey importation
-- (@true@) or not (@false@) when error is encountered.
importApiKeys_failOnWarnings :: Lens.Lens' ImportApiKeys (Prelude.Maybe Prelude.Bool)
importApiKeys_failOnWarnings :: (Maybe Bool -> f (Maybe Bool)) -> ImportApiKeys -> f ImportApiKeys
importApiKeys_failOnWarnings = (ImportApiKeys -> Maybe Bool)
-> (ImportApiKeys -> Maybe Bool -> ImportApiKeys)
-> Lens ImportApiKeys ImportApiKeys (Maybe Bool) (Maybe Bool)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportApiKeys' {Maybe Bool
failOnWarnings :: Maybe Bool
$sel:failOnWarnings:ImportApiKeys' :: ImportApiKeys -> Maybe Bool
failOnWarnings} -> Maybe Bool
failOnWarnings) (\s :: ImportApiKeys
s@ImportApiKeys' {} Maybe Bool
a -> ImportApiKeys
s {$sel:failOnWarnings:ImportApiKeys' :: Maybe Bool
failOnWarnings = Maybe Bool
a} :: ImportApiKeys)

-- | The payload of the POST request to import API keys. For the payload
-- format, see
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/api-key-file-format.html API Key File Format>.
importApiKeys_body :: Lens.Lens' ImportApiKeys Prelude.ByteString
importApiKeys_body :: (ByteString -> f ByteString) -> ImportApiKeys -> f ImportApiKeys
importApiKeys_body = (ImportApiKeys -> ByteString)
-> (ImportApiKeys -> ByteString -> ImportApiKeys)
-> Lens ImportApiKeys ImportApiKeys ByteString ByteString
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportApiKeys' {ByteString
body :: ByteString
$sel:body:ImportApiKeys' :: ImportApiKeys -> ByteString
body} -> ByteString
body) (\s :: ImportApiKeys
s@ImportApiKeys' {} ByteString
a -> ImportApiKeys
s {$sel:body:ImportApiKeys' :: ByteString
body = ByteString
a} :: ImportApiKeys)

-- | A query parameter to specify the input format to imported API keys.
-- Currently, only the @csv@ format is supported.
importApiKeys_format :: Lens.Lens' ImportApiKeys ApiKeysFormat
importApiKeys_format :: (ApiKeysFormat -> f ApiKeysFormat)
-> ImportApiKeys -> f ImportApiKeys
importApiKeys_format = (ImportApiKeys -> ApiKeysFormat)
-> (ImportApiKeys -> ApiKeysFormat -> ImportApiKeys)
-> Lens ImportApiKeys ImportApiKeys ApiKeysFormat ApiKeysFormat
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportApiKeys' {ApiKeysFormat
format :: ApiKeysFormat
$sel:format:ImportApiKeys' :: ImportApiKeys -> ApiKeysFormat
format} -> ApiKeysFormat
format) (\s :: ImportApiKeys
s@ImportApiKeys' {} ApiKeysFormat
a -> ImportApiKeys
s {$sel:format:ImportApiKeys' :: ApiKeysFormat
format = ApiKeysFormat
a} :: ImportApiKeys)

instance Core.AWSRequest ImportApiKeys where
  type
    AWSResponse ImportApiKeys =
      ImportApiKeysResponse
  request :: ImportApiKeys -> Request ImportApiKeys
request = Service -> ImportApiKeys -> Request ImportApiKeys
forall a. (ToRequest a, ToBody a) => Service -> a -> Request a
Request.postBody Service
defaultService
  response :: Logger
-> Service
-> Proxy ImportApiKeys
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportApiKeys)))
response =
    (Int
 -> ResponseHeaders
 -> Object
 -> Either String (AWSResponse ImportApiKeys))
-> Logger
-> Service
-> Proxy ImportApiKeys
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse ImportApiKeys)))
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] -> Maybe [Text] -> Int -> ImportApiKeysResponse
ImportApiKeysResponse'
            (Maybe [Text] -> Maybe [Text] -> Int -> ImportApiKeysResponse)
-> Either String (Maybe [Text])
-> Either String (Maybe [Text] -> Int -> ImportApiKeysResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"ids" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Maybe [Text] -> Int -> ImportApiKeysResponse)
-> Either String (Maybe [Text])
-> Either String (Int -> ImportApiKeysResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x Object -> Text -> Either String (Maybe (Maybe [Text]))
forall a. FromJSON a => Object -> Text -> Either String (Maybe a)
Core..?> Text
"warnings" Either String (Maybe (Maybe [Text]))
-> Maybe [Text] -> Either String (Maybe [Text])
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ Maybe [Text]
forall a. Monoid a => a
Prelude.mempty)
            Either String (Int -> ImportApiKeysResponse)
-> Either String Int -> Either String ImportApiKeysResponse
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 ImportApiKeys

instance Prelude.NFData ImportApiKeys

instance Core.ToBody ImportApiKeys where
  toBody :: ImportApiKeys -> RequestBody
toBody ImportApiKeys' {Maybe Bool
ByteString
ApiKeysFormat
format :: ApiKeysFormat
body :: ByteString
failOnWarnings :: Maybe Bool
$sel:format:ImportApiKeys' :: ImportApiKeys -> ApiKeysFormat
$sel:body:ImportApiKeys' :: ImportApiKeys -> ByteString
$sel:failOnWarnings:ImportApiKeys' :: ImportApiKeys -> Maybe Bool
..} = ByteString -> RequestBody
forall a. ToBody a => a -> RequestBody
Core.toBody ByteString
body

instance Core.ToHeaders ImportApiKeys where
  toHeaders :: ImportApiKeys -> ResponseHeaders
toHeaders =
    ResponseHeaders -> ImportApiKeys -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const
      ( [ResponseHeaders] -> ResponseHeaders
forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Accept"
              HeaderName -> ByteString -> ResponseHeaders
forall a. ToHeader a => HeaderName -> a -> ResponseHeaders
Core.=# (ByteString
"application/json" :: Prelude.ByteString)
          ]
      )

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

instance Core.ToQuery ImportApiKeys where
  toQuery :: ImportApiKeys -> QueryString
toQuery ImportApiKeys' {Maybe Bool
ByteString
ApiKeysFormat
format :: ApiKeysFormat
body :: ByteString
failOnWarnings :: Maybe Bool
$sel:format:ImportApiKeys' :: ImportApiKeys -> ApiKeysFormat
$sel:body:ImportApiKeys' :: ImportApiKeys -> ByteString
$sel:failOnWarnings:ImportApiKeys' :: ImportApiKeys -> Maybe Bool
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"failonwarnings" ByteString -> Maybe Bool -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Bool
failOnWarnings,
        ByteString
"format" ByteString -> ApiKeysFormat -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: ApiKeysFormat
format,
        QueryString
"mode=import"
      ]

-- | The identifier of an ApiKey used in a UsagePlan.
--
-- /See:/ 'newImportApiKeysResponse' smart constructor.
data ImportApiKeysResponse = ImportApiKeysResponse'
  { -- | A list of all the ApiKey identifiers.
    ImportApiKeysResponse -> Maybe [Text]
ids :: Prelude.Maybe [Prelude.Text],
    -- | A list of warning messages.
    ImportApiKeysResponse -> Maybe [Text]
warnings :: Prelude.Maybe [Prelude.Text],
    -- | The response's http status code.
    ImportApiKeysResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (ImportApiKeysResponse -> ImportApiKeysResponse -> Bool
(ImportApiKeysResponse -> ImportApiKeysResponse -> Bool)
-> (ImportApiKeysResponse -> ImportApiKeysResponse -> Bool)
-> Eq ImportApiKeysResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ImportApiKeysResponse -> ImportApiKeysResponse -> Bool
$c/= :: ImportApiKeysResponse -> ImportApiKeysResponse -> Bool
== :: ImportApiKeysResponse -> ImportApiKeysResponse -> Bool
$c== :: ImportApiKeysResponse -> ImportApiKeysResponse -> Bool
Prelude.Eq, ReadPrec [ImportApiKeysResponse]
ReadPrec ImportApiKeysResponse
Int -> ReadS ImportApiKeysResponse
ReadS [ImportApiKeysResponse]
(Int -> ReadS ImportApiKeysResponse)
-> ReadS [ImportApiKeysResponse]
-> ReadPrec ImportApiKeysResponse
-> ReadPrec [ImportApiKeysResponse]
-> Read ImportApiKeysResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ImportApiKeysResponse]
$creadListPrec :: ReadPrec [ImportApiKeysResponse]
readPrec :: ReadPrec ImportApiKeysResponse
$creadPrec :: ReadPrec ImportApiKeysResponse
readList :: ReadS [ImportApiKeysResponse]
$creadList :: ReadS [ImportApiKeysResponse]
readsPrec :: Int -> ReadS ImportApiKeysResponse
$creadsPrec :: Int -> ReadS ImportApiKeysResponse
Prelude.Read, Int -> ImportApiKeysResponse -> ShowS
[ImportApiKeysResponse] -> ShowS
ImportApiKeysResponse -> String
(Int -> ImportApiKeysResponse -> ShowS)
-> (ImportApiKeysResponse -> String)
-> ([ImportApiKeysResponse] -> ShowS)
-> Show ImportApiKeysResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ImportApiKeysResponse] -> ShowS
$cshowList :: [ImportApiKeysResponse] -> ShowS
show :: ImportApiKeysResponse -> String
$cshow :: ImportApiKeysResponse -> String
showsPrec :: Int -> ImportApiKeysResponse -> ShowS
$cshowsPrec :: Int -> ImportApiKeysResponse -> ShowS
Prelude.Show, (forall x. ImportApiKeysResponse -> Rep ImportApiKeysResponse x)
-> (forall x. Rep ImportApiKeysResponse x -> ImportApiKeysResponse)
-> Generic ImportApiKeysResponse
forall x. Rep ImportApiKeysResponse x -> ImportApiKeysResponse
forall x. ImportApiKeysResponse -> Rep ImportApiKeysResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ImportApiKeysResponse x -> ImportApiKeysResponse
$cfrom :: forall x. ImportApiKeysResponse -> Rep ImportApiKeysResponse x
Prelude.Generic)

-- |
-- Create a value of 'ImportApiKeysResponse' 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:
--
-- 'ids', 'importApiKeysResponse_ids' - A list of all the ApiKey identifiers.
--
-- 'warnings', 'importApiKeysResponse_warnings' - A list of warning messages.
--
-- 'httpStatus', 'importApiKeysResponse_httpStatus' - The response's http status code.
newImportApiKeysResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  ImportApiKeysResponse
newImportApiKeysResponse :: Int -> ImportApiKeysResponse
newImportApiKeysResponse Int
pHttpStatus_ =
  ImportApiKeysResponse' :: Maybe [Text] -> Maybe [Text] -> Int -> ImportApiKeysResponse
ImportApiKeysResponse'
    { $sel:ids:ImportApiKeysResponse' :: Maybe [Text]
ids = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:warnings:ImportApiKeysResponse' :: Maybe [Text]
warnings = Maybe [Text]
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:ImportApiKeysResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | A list of all the ApiKey identifiers.
importApiKeysResponse_ids :: Lens.Lens' ImportApiKeysResponse (Prelude.Maybe [Prelude.Text])
importApiKeysResponse_ids :: (Maybe [Text] -> f (Maybe [Text]))
-> ImportApiKeysResponse -> f ImportApiKeysResponse
importApiKeysResponse_ids = (ImportApiKeysResponse -> Maybe [Text])
-> (ImportApiKeysResponse -> Maybe [Text] -> ImportApiKeysResponse)
-> Lens
     ImportApiKeysResponse
     ImportApiKeysResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportApiKeysResponse' {Maybe [Text]
ids :: Maybe [Text]
$sel:ids:ImportApiKeysResponse' :: ImportApiKeysResponse -> Maybe [Text]
ids} -> Maybe [Text]
ids) (\s :: ImportApiKeysResponse
s@ImportApiKeysResponse' {} Maybe [Text]
a -> ImportApiKeysResponse
s {$sel:ids:ImportApiKeysResponse' :: Maybe [Text]
ids = Maybe [Text]
a} :: ImportApiKeysResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ImportApiKeysResponse -> f ImportApiKeysResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ImportApiKeysResponse
-> f ImportApiKeysResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A list of warning messages.
importApiKeysResponse_warnings :: Lens.Lens' ImportApiKeysResponse (Prelude.Maybe [Prelude.Text])
importApiKeysResponse_warnings :: (Maybe [Text] -> f (Maybe [Text]))
-> ImportApiKeysResponse -> f ImportApiKeysResponse
importApiKeysResponse_warnings = (ImportApiKeysResponse -> Maybe [Text])
-> (ImportApiKeysResponse -> Maybe [Text] -> ImportApiKeysResponse)
-> Lens
     ImportApiKeysResponse
     ImportApiKeysResponse
     (Maybe [Text])
     (Maybe [Text])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ImportApiKeysResponse' {Maybe [Text]
warnings :: Maybe [Text]
$sel:warnings:ImportApiKeysResponse' :: ImportApiKeysResponse -> Maybe [Text]
warnings} -> Maybe [Text]
warnings) (\s :: ImportApiKeysResponse
s@ImportApiKeysResponse' {} Maybe [Text]
a -> ImportApiKeysResponse
s {$sel:warnings:ImportApiKeysResponse' :: Maybe [Text]
warnings = Maybe [Text]
a} :: ImportApiKeysResponse) ((Maybe [Text] -> f (Maybe [Text]))
 -> ImportApiKeysResponse -> f ImportApiKeysResponse)
-> ((Maybe [Text] -> f (Maybe [Text]))
    -> Maybe [Text] -> f (Maybe [Text]))
-> (Maybe [Text] -> f (Maybe [Text]))
-> ImportApiKeysResponse
-> f ImportApiKeysResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso [Text] [Text] [Text] [Text]
-> Iso (Maybe [Text]) (Maybe [Text]) (Maybe [Text]) (Maybe [Text])
forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping AnIso [Text] [Text] [Text] [Text]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance Prelude.NFData ImportApiKeysResponse