{-# 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.GetBasePathMappings
-- 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)
--
-- Represents a collection of BasePathMapping resources.
--
-- This operation returns paginated results.
module Amazonka.APIGateway.GetBasePathMappings
  ( -- * Creating a Request
    GetBasePathMappings (..),
    newGetBasePathMappings,

    -- * Request Lenses
    getBasePathMappings_limit,
    getBasePathMappings_position,
    getBasePathMappings_domainName,

    -- * Destructuring the Response
    GetBasePathMappingsResponse (..),
    newGetBasePathMappingsResponse,

    -- * Response Lenses
    getBasePathMappingsResponse_items,
    getBasePathMappingsResponse_position,
    getBasePathMappingsResponse_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

-- | A request to get information about a collection of BasePathMapping
-- resources.
--
-- /See:/ 'newGetBasePathMappings' smart constructor.
data GetBasePathMappings = GetBasePathMappings'
  { -- | The maximum number of returned results per page. The default value is 25
    -- and the maximum value is 500.
    GetBasePathMappings -> Maybe Int
limit :: Prelude.Maybe Prelude.Int,
    -- | The current pagination position in the paged result set.
    GetBasePathMappings -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
    -- | [Required] The domain name of a BasePathMapping resource.
    GetBasePathMappings -> Text
domainName :: Prelude.Text
  }
  deriving (GetBasePathMappings -> GetBasePathMappings -> Bool
(GetBasePathMappings -> GetBasePathMappings -> Bool)
-> (GetBasePathMappings -> GetBasePathMappings -> Bool)
-> Eq GetBasePathMappings
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBasePathMappings -> GetBasePathMappings -> Bool
$c/= :: GetBasePathMappings -> GetBasePathMappings -> Bool
== :: GetBasePathMappings -> GetBasePathMappings -> Bool
$c== :: GetBasePathMappings -> GetBasePathMappings -> Bool
Prelude.Eq, ReadPrec [GetBasePathMappings]
ReadPrec GetBasePathMappings
Int -> ReadS GetBasePathMappings
ReadS [GetBasePathMappings]
(Int -> ReadS GetBasePathMappings)
-> ReadS [GetBasePathMappings]
-> ReadPrec GetBasePathMappings
-> ReadPrec [GetBasePathMappings]
-> Read GetBasePathMappings
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBasePathMappings]
$creadListPrec :: ReadPrec [GetBasePathMappings]
readPrec :: ReadPrec GetBasePathMappings
$creadPrec :: ReadPrec GetBasePathMappings
readList :: ReadS [GetBasePathMappings]
$creadList :: ReadS [GetBasePathMappings]
readsPrec :: Int -> ReadS GetBasePathMappings
$creadsPrec :: Int -> ReadS GetBasePathMappings
Prelude.Read, Int -> GetBasePathMappings -> ShowS
[GetBasePathMappings] -> ShowS
GetBasePathMappings -> String
(Int -> GetBasePathMappings -> ShowS)
-> (GetBasePathMappings -> String)
-> ([GetBasePathMappings] -> ShowS)
-> Show GetBasePathMappings
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBasePathMappings] -> ShowS
$cshowList :: [GetBasePathMappings] -> ShowS
show :: GetBasePathMappings -> String
$cshow :: GetBasePathMappings -> String
showsPrec :: Int -> GetBasePathMappings -> ShowS
$cshowsPrec :: Int -> GetBasePathMappings -> ShowS
Prelude.Show, (forall x. GetBasePathMappings -> Rep GetBasePathMappings x)
-> (forall x. Rep GetBasePathMappings x -> GetBasePathMappings)
-> Generic GetBasePathMappings
forall x. Rep GetBasePathMappings x -> GetBasePathMappings
forall x. GetBasePathMappings -> Rep GetBasePathMappings x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep GetBasePathMappings x -> GetBasePathMappings
$cfrom :: forall x. GetBasePathMappings -> Rep GetBasePathMappings x
Prelude.Generic)

-- |
-- Create a value of 'GetBasePathMappings' 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:
--
-- 'limit', 'getBasePathMappings_limit' - The maximum number of returned results per page. The default value is 25
-- and the maximum value is 500.
--
-- 'position', 'getBasePathMappings_position' - The current pagination position in the paged result set.
--
-- 'domainName', 'getBasePathMappings_domainName' - [Required] The domain name of a BasePathMapping resource.
newGetBasePathMappings ::
  -- | 'domainName'
  Prelude.Text ->
  GetBasePathMappings
newGetBasePathMappings :: Text -> GetBasePathMappings
newGetBasePathMappings Text
pDomainName_ =
  GetBasePathMappings' :: Maybe Int -> Maybe Text -> Text -> GetBasePathMappings
GetBasePathMappings'
    { $sel:limit:GetBasePathMappings' :: Maybe Int
limit = Maybe Int
forall a. Maybe a
Prelude.Nothing,
      $sel:position:GetBasePathMappings' :: Maybe Text
position = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:domainName:GetBasePathMappings' :: Text
domainName = Text
pDomainName_
    }

-- | The maximum number of returned results per page. The default value is 25
-- and the maximum value is 500.
getBasePathMappings_limit :: Lens.Lens' GetBasePathMappings (Prelude.Maybe Prelude.Int)
getBasePathMappings_limit :: (Maybe Int -> f (Maybe Int))
-> GetBasePathMappings -> f GetBasePathMappings
getBasePathMappings_limit = (GetBasePathMappings -> Maybe Int)
-> (GetBasePathMappings -> Maybe Int -> GetBasePathMappings)
-> Lens
     GetBasePathMappings GetBasePathMappings (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBasePathMappings' {Maybe Int
limit :: Maybe Int
$sel:limit:GetBasePathMappings' :: GetBasePathMappings -> Maybe Int
limit} -> Maybe Int
limit) (\s :: GetBasePathMappings
s@GetBasePathMappings' {} Maybe Int
a -> GetBasePathMappings
s {$sel:limit:GetBasePathMappings' :: Maybe Int
limit = Maybe Int
a} :: GetBasePathMappings)

-- | The current pagination position in the paged result set.
getBasePathMappings_position :: Lens.Lens' GetBasePathMappings (Prelude.Maybe Prelude.Text)
getBasePathMappings_position :: (Maybe Text -> f (Maybe Text))
-> GetBasePathMappings -> f GetBasePathMappings
getBasePathMappings_position = (GetBasePathMappings -> Maybe Text)
-> (GetBasePathMappings -> Maybe Text -> GetBasePathMappings)
-> Lens
     GetBasePathMappings GetBasePathMappings (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBasePathMappings' {Maybe Text
position :: Maybe Text
$sel:position:GetBasePathMappings' :: GetBasePathMappings -> Maybe Text
position} -> Maybe Text
position) (\s :: GetBasePathMappings
s@GetBasePathMappings' {} Maybe Text
a -> GetBasePathMappings
s {$sel:position:GetBasePathMappings' :: Maybe Text
position = Maybe Text
a} :: GetBasePathMappings)

-- | [Required] The domain name of a BasePathMapping resource.
getBasePathMappings_domainName :: Lens.Lens' GetBasePathMappings Prelude.Text
getBasePathMappings_domainName :: (Text -> f Text) -> GetBasePathMappings -> f GetBasePathMappings
getBasePathMappings_domainName = (GetBasePathMappings -> Text)
-> (GetBasePathMappings -> Text -> GetBasePathMappings)
-> Lens GetBasePathMappings GetBasePathMappings Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBasePathMappings' {Text
domainName :: Text
$sel:domainName:GetBasePathMappings' :: GetBasePathMappings -> Text
domainName} -> Text
domainName) (\s :: GetBasePathMappings
s@GetBasePathMappings' {} Text
a -> GetBasePathMappings
s {$sel:domainName:GetBasePathMappings' :: Text
domainName = Text
a} :: GetBasePathMappings)

instance Core.AWSPager GetBasePathMappings where
  page :: GetBasePathMappings
-> AWSResponse GetBasePathMappings -> Maybe GetBasePathMappings
page GetBasePathMappings
rq AWSResponse GetBasePathMappings
rs
    | Maybe Text -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetBasePathMappings
GetBasePathMappingsResponse
rs
            GetBasePathMappingsResponse
-> Getting (First Text) GetBasePathMappingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetBasePathMappingsResponse
-> Const (First Text) GetBasePathMappingsResponse
Lens' GetBasePathMappingsResponse (Maybe Text)
getBasePathMappingsResponse_position
              ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetBasePathMappingsResponse
 -> Const (First Text) GetBasePathMappingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetBasePathMappingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetBasePathMappings
forall a. Maybe a
Prelude.Nothing
    | Maybe [BasePathMapping] -> Bool
forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetBasePathMappings
GetBasePathMappingsResponse
rs
            GetBasePathMappingsResponse
-> Getting
     (First [BasePathMapping])
     GetBasePathMappingsResponse
     [BasePathMapping]
-> Maybe [BasePathMapping]
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe [BasePathMapping]
 -> Const (First [BasePathMapping]) (Maybe [BasePathMapping]))
-> GetBasePathMappingsResponse
-> Const (First [BasePathMapping]) GetBasePathMappingsResponse
Lens' GetBasePathMappingsResponse (Maybe [BasePathMapping])
getBasePathMappingsResponse_items
              ((Maybe [BasePathMapping]
  -> Const (First [BasePathMapping]) (Maybe [BasePathMapping]))
 -> GetBasePathMappingsResponse
 -> Const (First [BasePathMapping]) GetBasePathMappingsResponse)
-> (([BasePathMapping]
     -> Const (First [BasePathMapping]) [BasePathMapping])
    -> Maybe [BasePathMapping]
    -> Const (First [BasePathMapping]) (Maybe [BasePathMapping]))
-> Getting
     (First [BasePathMapping])
     GetBasePathMappingsResponse
     [BasePathMapping]
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([BasePathMapping]
 -> Const (First [BasePathMapping]) [BasePathMapping])
-> Maybe [BasePathMapping]
-> Const (First [BasePathMapping]) (Maybe [BasePathMapping])
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
      Maybe GetBasePathMappings
forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
      GetBasePathMappings -> Maybe GetBasePathMappings
forall a. a -> Maybe a
Prelude.Just (GetBasePathMappings -> Maybe GetBasePathMappings)
-> GetBasePathMappings -> Maybe GetBasePathMappings
forall a b. (a -> b) -> a -> b
Prelude.$
        GetBasePathMappings
rq
          GetBasePathMappings
-> (GetBasePathMappings -> GetBasePathMappings)
-> GetBasePathMappings
forall a b. a -> (a -> b) -> b
Prelude.& (Maybe Text -> Identity (Maybe Text))
-> GetBasePathMappings -> Identity GetBasePathMappings
Lens
  GetBasePathMappings GetBasePathMappings (Maybe Text) (Maybe Text)
getBasePathMappings_position
          ((Maybe Text -> Identity (Maybe Text))
 -> GetBasePathMappings -> Identity GetBasePathMappings)
-> Maybe Text -> GetBasePathMappings -> GetBasePathMappings
forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetBasePathMappings
GetBasePathMappingsResponse
rs
          GetBasePathMappingsResponse
-> Getting (First Text) GetBasePathMappingsResponse Text
-> Maybe Text
forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? (Maybe Text -> Const (First Text) (Maybe Text))
-> GetBasePathMappingsResponse
-> Const (First Text) GetBasePathMappingsResponse
Lens' GetBasePathMappingsResponse (Maybe Text)
getBasePathMappingsResponse_position
            ((Maybe Text -> Const (First Text) (Maybe Text))
 -> GetBasePathMappingsResponse
 -> Const (First Text) GetBasePathMappingsResponse)
-> ((Text -> Const (First Text) Text)
    -> Maybe Text -> Const (First Text) (Maybe Text))
-> Getting (First Text) GetBasePathMappingsResponse Text
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. (Text -> Const (First Text) Text)
-> Maybe Text -> Const (First Text) (Maybe Text)
forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

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

instance Prelude.NFData GetBasePathMappings

instance Core.ToHeaders GetBasePathMappings where
  toHeaders :: GetBasePathMappings -> ResponseHeaders
toHeaders =
    ResponseHeaders -> GetBasePathMappings -> 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 GetBasePathMappings where
  toPath :: GetBasePathMappings -> ByteString
toPath GetBasePathMappings' {Maybe Int
Maybe Text
Text
domainName :: Text
position :: Maybe Text
limit :: Maybe Int
$sel:domainName:GetBasePathMappings' :: GetBasePathMappings -> Text
$sel:position:GetBasePathMappings' :: GetBasePathMappings -> Maybe Text
$sel:limit:GetBasePathMappings' :: GetBasePathMappings -> Maybe Int
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/domainnames/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
domainName,
        ByteString
"/basepathmappings"
      ]

instance Core.ToQuery GetBasePathMappings where
  toQuery :: GetBasePathMappings -> QueryString
toQuery GetBasePathMappings' {Maybe Int
Maybe Text
Text
domainName :: Text
position :: Maybe Text
limit :: Maybe Int
$sel:domainName:GetBasePathMappings' :: GetBasePathMappings -> Text
$sel:position:GetBasePathMappings' :: GetBasePathMappings -> Maybe Text
$sel:limit:GetBasePathMappings' :: GetBasePathMappings -> Maybe Int
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ByteString
"limit" ByteString -> Maybe Int -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Int
limit, ByteString
"position" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
position]

-- | Represents a collection of BasePathMapping resources.
--
-- <https://docs.aws.amazon.com/apigateway/latest/developerguide/how-to-custom-domains.html Use Custom Domain Names>
--
-- /See:/ 'newGetBasePathMappingsResponse' smart constructor.
data GetBasePathMappingsResponse = GetBasePathMappingsResponse'
  { -- | The current page of elements from this collection.
    GetBasePathMappingsResponse -> Maybe [BasePathMapping]
items :: Prelude.Maybe [BasePathMapping],
    GetBasePathMappingsResponse -> Maybe Text
position :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    GetBasePathMappingsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetBasePathMappingsResponse -> GetBasePathMappingsResponse -> Bool
(GetBasePathMappingsResponse
 -> GetBasePathMappingsResponse -> Bool)
-> (GetBasePathMappingsResponse
    -> GetBasePathMappingsResponse -> Bool)
-> Eq GetBasePathMappingsResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetBasePathMappingsResponse -> GetBasePathMappingsResponse -> Bool
$c/= :: GetBasePathMappingsResponse -> GetBasePathMappingsResponse -> Bool
== :: GetBasePathMappingsResponse -> GetBasePathMappingsResponse -> Bool
$c== :: GetBasePathMappingsResponse -> GetBasePathMappingsResponse -> Bool
Prelude.Eq, ReadPrec [GetBasePathMappingsResponse]
ReadPrec GetBasePathMappingsResponse
Int -> ReadS GetBasePathMappingsResponse
ReadS [GetBasePathMappingsResponse]
(Int -> ReadS GetBasePathMappingsResponse)
-> ReadS [GetBasePathMappingsResponse]
-> ReadPrec GetBasePathMappingsResponse
-> ReadPrec [GetBasePathMappingsResponse]
-> Read GetBasePathMappingsResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetBasePathMappingsResponse]
$creadListPrec :: ReadPrec [GetBasePathMappingsResponse]
readPrec :: ReadPrec GetBasePathMappingsResponse
$creadPrec :: ReadPrec GetBasePathMappingsResponse
readList :: ReadS [GetBasePathMappingsResponse]
$creadList :: ReadS [GetBasePathMappingsResponse]
readsPrec :: Int -> ReadS GetBasePathMappingsResponse
$creadsPrec :: Int -> ReadS GetBasePathMappingsResponse
Prelude.Read, Int -> GetBasePathMappingsResponse -> ShowS
[GetBasePathMappingsResponse] -> ShowS
GetBasePathMappingsResponse -> String
(Int -> GetBasePathMappingsResponse -> ShowS)
-> (GetBasePathMappingsResponse -> String)
-> ([GetBasePathMappingsResponse] -> ShowS)
-> Show GetBasePathMappingsResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetBasePathMappingsResponse] -> ShowS
$cshowList :: [GetBasePathMappingsResponse] -> ShowS
show :: GetBasePathMappingsResponse -> String
$cshow :: GetBasePathMappingsResponse -> String
showsPrec :: Int -> GetBasePathMappingsResponse -> ShowS
$cshowsPrec :: Int -> GetBasePathMappingsResponse -> ShowS
Prelude.Show, (forall x.
 GetBasePathMappingsResponse -> Rep GetBasePathMappingsResponse x)
-> (forall x.
    Rep GetBasePathMappingsResponse x -> GetBasePathMappingsResponse)
-> Generic GetBasePathMappingsResponse
forall x.
Rep GetBasePathMappingsResponse x -> GetBasePathMappingsResponse
forall x.
GetBasePathMappingsResponse -> Rep GetBasePathMappingsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetBasePathMappingsResponse x -> GetBasePathMappingsResponse
$cfrom :: forall x.
GetBasePathMappingsResponse -> Rep GetBasePathMappingsResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetBasePathMappingsResponse' 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:
--
-- 'items', 'getBasePathMappingsResponse_items' - The current page of elements from this collection.
--
-- 'position', 'getBasePathMappingsResponse_position' - Undocumented member.
--
-- 'httpStatus', 'getBasePathMappingsResponse_httpStatus' - The response's http status code.
newGetBasePathMappingsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetBasePathMappingsResponse
newGetBasePathMappingsResponse :: Int -> GetBasePathMappingsResponse
newGetBasePathMappingsResponse Int
pHttpStatus_ =
  GetBasePathMappingsResponse' :: Maybe [BasePathMapping]
-> Maybe Text -> Int -> GetBasePathMappingsResponse
GetBasePathMappingsResponse'
    { $sel:items:GetBasePathMappingsResponse' :: Maybe [BasePathMapping]
items =
        Maybe [BasePathMapping]
forall a. Maybe a
Prelude.Nothing,
      $sel:position:GetBasePathMappingsResponse' :: Maybe Text
position = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetBasePathMappingsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The current page of elements from this collection.
getBasePathMappingsResponse_items :: Lens.Lens' GetBasePathMappingsResponse (Prelude.Maybe [BasePathMapping])
getBasePathMappingsResponse_items :: (Maybe [BasePathMapping] -> f (Maybe [BasePathMapping]))
-> GetBasePathMappingsResponse -> f GetBasePathMappingsResponse
getBasePathMappingsResponse_items = (GetBasePathMappingsResponse -> Maybe [BasePathMapping])
-> (GetBasePathMappingsResponse
    -> Maybe [BasePathMapping] -> GetBasePathMappingsResponse)
-> Lens' GetBasePathMappingsResponse (Maybe [BasePathMapping])
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBasePathMappingsResponse' {Maybe [BasePathMapping]
items :: Maybe [BasePathMapping]
$sel:items:GetBasePathMappingsResponse' :: GetBasePathMappingsResponse -> Maybe [BasePathMapping]
items} -> Maybe [BasePathMapping]
items) (\s :: GetBasePathMappingsResponse
s@GetBasePathMappingsResponse' {} Maybe [BasePathMapping]
a -> GetBasePathMappingsResponse
s {$sel:items:GetBasePathMappingsResponse' :: Maybe [BasePathMapping]
items = Maybe [BasePathMapping]
a} :: GetBasePathMappingsResponse) ((Maybe [BasePathMapping] -> f (Maybe [BasePathMapping]))
 -> GetBasePathMappingsResponse -> f GetBasePathMappingsResponse)
-> ((Maybe [BasePathMapping] -> f (Maybe [BasePathMapping]))
    -> Maybe [BasePathMapping] -> f (Maybe [BasePathMapping]))
-> (Maybe [BasePathMapping] -> f (Maybe [BasePathMapping]))
-> GetBasePathMappingsResponse
-> f GetBasePathMappingsResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
  [BasePathMapping]
  [BasePathMapping]
  [BasePathMapping]
  [BasePathMapping]
-> Iso
     (Maybe [BasePathMapping])
     (Maybe [BasePathMapping])
     (Maybe [BasePathMapping])
     (Maybe [BasePathMapping])
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
  [BasePathMapping]
  [BasePathMapping]
  [BasePathMapping]
  [BasePathMapping]
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | Undocumented member.
getBasePathMappingsResponse_position :: Lens.Lens' GetBasePathMappingsResponse (Prelude.Maybe Prelude.Text)
getBasePathMappingsResponse_position :: (Maybe Text -> f (Maybe Text))
-> GetBasePathMappingsResponse -> f GetBasePathMappingsResponse
getBasePathMappingsResponse_position = (GetBasePathMappingsResponse -> Maybe Text)
-> (GetBasePathMappingsResponse
    -> Maybe Text -> GetBasePathMappingsResponse)
-> Lens' GetBasePathMappingsResponse (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetBasePathMappingsResponse' {Maybe Text
position :: Maybe Text
$sel:position:GetBasePathMappingsResponse' :: GetBasePathMappingsResponse -> Maybe Text
position} -> Maybe Text
position) (\s :: GetBasePathMappingsResponse
s@GetBasePathMappingsResponse' {} Maybe Text
a -> GetBasePathMappingsResponse
s {$sel:position:GetBasePathMappingsResponse' :: Maybe Text
position = Maybe Text
a} :: GetBasePathMappingsResponse)

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

instance Prelude.NFData GetBasePathMappingsResponse