{-# 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.EC2.DescribePublicIpv4Pools
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Describes the specified IPv4 address pools.
--
-- This operation returns paginated results.
module Amazonka.EC2.DescribePublicIpv4Pools
  ( -- * Creating a Request
    DescribePublicIpv4Pools (..),
    newDescribePublicIpv4Pools,

    -- * Request Lenses
    describePublicIpv4Pools_filters,
    describePublicIpv4Pools_maxResults,
    describePublicIpv4Pools_nextToken,
    describePublicIpv4Pools_poolIds,

    -- * Destructuring the Response
    DescribePublicIpv4PoolsResponse (..),
    newDescribePublicIpv4PoolsResponse,

    -- * Response Lenses
    describePublicIpv4PoolsResponse_nextToken,
    describePublicIpv4PoolsResponse_publicIpv4Pools,
    describePublicIpv4PoolsResponse_httpStatus,
  )
where

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

-- | /See:/ 'newDescribePublicIpv4Pools' smart constructor.
data DescribePublicIpv4Pools = DescribePublicIpv4Pools'
  { -- | One or more filters.
    --
    -- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
    --     resource. Use the tag key in the filter name and the tag value as
    --     the filter value. For example, to find all resources that have a tag
    --     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
    --     the filter name and @TeamA@ for the filter value.
    --
    -- -   @tag-key@ - The key of a tag assigned to the resource. Use this
    --     filter to find all resources assigned a tag with a specific key,
    --     regardless of the tag value.
    DescribePublicIpv4Pools -> Maybe [Filter]
filters :: Prelude.Maybe [Filter],
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    DescribePublicIpv4Pools -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    DescribePublicIpv4Pools -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The IDs of the address pools.
    DescribePublicIpv4Pools -> Maybe [Text]
poolIds :: Prelude.Maybe [Prelude.Text]
  }
  deriving (DescribePublicIpv4Pools -> DescribePublicIpv4Pools -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePublicIpv4Pools -> DescribePublicIpv4Pools -> Bool
$c/= :: DescribePublicIpv4Pools -> DescribePublicIpv4Pools -> Bool
== :: DescribePublicIpv4Pools -> DescribePublicIpv4Pools -> Bool
$c== :: DescribePublicIpv4Pools -> DescribePublicIpv4Pools -> Bool
Prelude.Eq, ReadPrec [DescribePublicIpv4Pools]
ReadPrec DescribePublicIpv4Pools
Int -> ReadS DescribePublicIpv4Pools
ReadS [DescribePublicIpv4Pools]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePublicIpv4Pools]
$creadListPrec :: ReadPrec [DescribePublicIpv4Pools]
readPrec :: ReadPrec DescribePublicIpv4Pools
$creadPrec :: ReadPrec DescribePublicIpv4Pools
readList :: ReadS [DescribePublicIpv4Pools]
$creadList :: ReadS [DescribePublicIpv4Pools]
readsPrec :: Int -> ReadS DescribePublicIpv4Pools
$creadsPrec :: Int -> ReadS DescribePublicIpv4Pools
Prelude.Read, Int -> DescribePublicIpv4Pools -> ShowS
[DescribePublicIpv4Pools] -> ShowS
DescribePublicIpv4Pools -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePublicIpv4Pools] -> ShowS
$cshowList :: [DescribePublicIpv4Pools] -> ShowS
show :: DescribePublicIpv4Pools -> String
$cshow :: DescribePublicIpv4Pools -> String
showsPrec :: Int -> DescribePublicIpv4Pools -> ShowS
$cshowsPrec :: Int -> DescribePublicIpv4Pools -> ShowS
Prelude.Show, forall x. Rep DescribePublicIpv4Pools x -> DescribePublicIpv4Pools
forall x. DescribePublicIpv4Pools -> Rep DescribePublicIpv4Pools x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DescribePublicIpv4Pools x -> DescribePublicIpv4Pools
$cfrom :: forall x. DescribePublicIpv4Pools -> Rep DescribePublicIpv4Pools x
Prelude.Generic)

-- |
-- Create a value of 'DescribePublicIpv4Pools' 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:
--
-- 'filters', 'describePublicIpv4Pools_filters' - One or more filters.
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
--
-- 'maxResults', 'describePublicIpv4Pools_maxResults' - The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
--
-- 'nextToken', 'describePublicIpv4Pools_nextToken' - The token for the next page of results.
--
-- 'poolIds', 'describePublicIpv4Pools_poolIds' - The IDs of the address pools.
newDescribePublicIpv4Pools ::
  DescribePublicIpv4Pools
newDescribePublicIpv4Pools :: DescribePublicIpv4Pools
newDescribePublicIpv4Pools =
  DescribePublicIpv4Pools'
    { $sel:filters:DescribePublicIpv4Pools' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:DescribePublicIpv4Pools' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:DescribePublicIpv4Pools' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:poolIds:DescribePublicIpv4Pools' :: Maybe [Text]
poolIds = forall a. Maybe a
Prelude.Nothing
    }

-- | One or more filters.
--
-- -   @tag@:\<key> - The key\/value combination of a tag assigned to the
--     resource. Use the tag key in the filter name and the tag value as
--     the filter value. For example, to find all resources that have a tag
--     with the key @Owner@ and the value @TeamA@, specify @tag:Owner@ for
--     the filter name and @TeamA@ for the filter value.
--
-- -   @tag-key@ - The key of a tag assigned to the resource. Use this
--     filter to find all resources assigned a tag with a specific key,
--     regardless of the tag value.
describePublicIpv4Pools_filters :: Lens.Lens' DescribePublicIpv4Pools (Prelude.Maybe [Filter])
describePublicIpv4Pools_filters :: Lens' DescribePublicIpv4Pools (Maybe [Filter])
describePublicIpv4Pools_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4Pools' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: DescribePublicIpv4Pools
s@DescribePublicIpv4Pools' {} Maybe [Filter]
a -> DescribePublicIpv4Pools
s {$sel:filters:DescribePublicIpv4Pools' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: DescribePublicIpv4Pools) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | The maximum number of results to return with a single call. To retrieve
-- the remaining results, make another call with the returned @nextToken@
-- value.
describePublicIpv4Pools_maxResults :: Lens.Lens' DescribePublicIpv4Pools (Prelude.Maybe Prelude.Natural)
describePublicIpv4Pools_maxResults :: Lens' DescribePublicIpv4Pools (Maybe Natural)
describePublicIpv4Pools_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4Pools' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: DescribePublicIpv4Pools
s@DescribePublicIpv4Pools' {} Maybe Natural
a -> DescribePublicIpv4Pools
s {$sel:maxResults:DescribePublicIpv4Pools' :: Maybe Natural
maxResults = Maybe Natural
a} :: DescribePublicIpv4Pools)

-- | The token for the next page of results.
describePublicIpv4Pools_nextToken :: Lens.Lens' DescribePublicIpv4Pools (Prelude.Maybe Prelude.Text)
describePublicIpv4Pools_nextToken :: Lens' DescribePublicIpv4Pools (Maybe Text)
describePublicIpv4Pools_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4Pools' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePublicIpv4Pools
s@DescribePublicIpv4Pools' {} Maybe Text
a -> DescribePublicIpv4Pools
s {$sel:nextToken:DescribePublicIpv4Pools' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePublicIpv4Pools)

-- | The IDs of the address pools.
describePublicIpv4Pools_poolIds :: Lens.Lens' DescribePublicIpv4Pools (Prelude.Maybe [Prelude.Text])
describePublicIpv4Pools_poolIds :: Lens' DescribePublicIpv4Pools (Maybe [Text])
describePublicIpv4Pools_poolIds = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4Pools' {Maybe [Text]
poolIds :: Maybe [Text]
$sel:poolIds:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Text]
poolIds} -> Maybe [Text]
poolIds) (\s :: DescribePublicIpv4Pools
s@DescribePublicIpv4Pools' {} Maybe [Text]
a -> DescribePublicIpv4Pools
s {$sel:poolIds:DescribePublicIpv4Pools' :: Maybe [Text]
poolIds = Maybe [Text]
a} :: DescribePublicIpv4Pools) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

instance Core.AWSPager DescribePublicIpv4Pools where
  page :: DescribePublicIpv4Pools
-> AWSResponse DescribePublicIpv4Pools
-> Maybe DescribePublicIpv4Pools
page DescribePublicIpv4Pools
rq AWSResponse DescribePublicIpv4Pools
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribePublicIpv4Pools
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribePublicIpv4PoolsResponse (Maybe Text)
describePublicIpv4PoolsResponse_nextToken
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse DescribePublicIpv4Pools
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribePublicIpv4PoolsResponse (Maybe [PublicIpv4Pool])
describePublicIpv4PoolsResponse_publicIpv4Pools
            forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just
        ) =
        forall a. Maybe a
Prelude.Nothing
    | Bool
Prelude.otherwise =
        forall a. a -> Maybe a
Prelude.Just
          forall a b. (a -> b) -> a -> b
Prelude.$ DescribePublicIpv4Pools
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' DescribePublicIpv4Pools (Maybe Text)
describePublicIpv4Pools_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse DescribePublicIpv4Pools
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' DescribePublicIpv4PoolsResponse (Maybe Text)
describePublicIpv4PoolsResponse_nextToken
          forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall a b. Prism (Maybe a) (Maybe b) a b
Lens._Just

instance Core.AWSRequest DescribePublicIpv4Pools where
  type
    AWSResponse DescribePublicIpv4Pools =
      DescribePublicIpv4PoolsResponse
  request :: (Service -> Service)
-> DescribePublicIpv4Pools -> Request DescribePublicIpv4Pools
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.postQuery (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DescribePublicIpv4Pools
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DescribePublicIpv4Pools)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe Text
-> Maybe [PublicIpv4Pool] -> Int -> DescribePublicIpv4PoolsResponse
DescribePublicIpv4PoolsResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"nextToken")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"publicIpv4PoolSet"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall (f :: * -> *) a b.
Applicative f =>
([a] -> f b) -> [a] -> f (Maybe b)
Core.may (forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"item")
                        )
            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))
      )

instance Prelude.Hashable DescribePublicIpv4Pools where
  hashWithSalt :: Int -> DescribePublicIpv4Pools -> Int
hashWithSalt Int
_salt DescribePublicIpv4Pools' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
poolIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:poolIds:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Text]
$sel:nextToken:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Text
$sel:maxResults:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Natural
$sel:filters:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Filter]
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Filter]
filters
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Natural
maxResults
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Text]
poolIds

instance Prelude.NFData DescribePublicIpv4Pools where
  rnf :: DescribePublicIpv4Pools -> ()
rnf DescribePublicIpv4Pools' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
poolIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:poolIds:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Text]
$sel:nextToken:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Text
$sel:maxResults:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Natural
$sel:filters:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Filter]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Filter]
filters
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Natural
maxResults
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Text]
poolIds

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

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

instance Data.ToQuery DescribePublicIpv4Pools where
  toQuery :: DescribePublicIpv4Pools -> QueryString
toQuery DescribePublicIpv4Pools' {Maybe Natural
Maybe [Text]
Maybe [Filter]
Maybe Text
poolIds :: Maybe [Text]
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
$sel:poolIds:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Text]
$sel:nextToken:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Text
$sel:maxResults:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe Natural
$sel:filters:DescribePublicIpv4Pools' :: DescribePublicIpv4Pools -> Maybe [Filter]
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"DescribePublicIpv4Pools" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"Filter" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Filter]
filters),
        ByteString
"MaxResults" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Natural
maxResults,
        ByteString
"NextToken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        forall a. ToQuery a => a -> QueryString
Data.toQuery
          (forall a.
(IsList a, ToQuery (Item a)) =>
ByteString -> a -> QueryString
Data.toQueryList ByteString
"PoolId" forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Text]
poolIds)
      ]

-- | /See:/ 'newDescribePublicIpv4PoolsResponse' smart constructor.
data DescribePublicIpv4PoolsResponse = DescribePublicIpv4PoolsResponse'
  { -- | The token to use to retrieve the next page of results. This value is
    -- @null@ when there are no more results to return.
    DescribePublicIpv4PoolsResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | Information about the address pools.
    DescribePublicIpv4PoolsResponse -> Maybe [PublicIpv4Pool]
publicIpv4Pools :: Prelude.Maybe [PublicIpv4Pool],
    -- | The response's http status code.
    DescribePublicIpv4PoolsResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (DescribePublicIpv4PoolsResponse
-> DescribePublicIpv4PoolsResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DescribePublicIpv4PoolsResponse
-> DescribePublicIpv4PoolsResponse -> Bool
$c/= :: DescribePublicIpv4PoolsResponse
-> DescribePublicIpv4PoolsResponse -> Bool
== :: DescribePublicIpv4PoolsResponse
-> DescribePublicIpv4PoolsResponse -> Bool
$c== :: DescribePublicIpv4PoolsResponse
-> DescribePublicIpv4PoolsResponse -> Bool
Prelude.Eq, ReadPrec [DescribePublicIpv4PoolsResponse]
ReadPrec DescribePublicIpv4PoolsResponse
Int -> ReadS DescribePublicIpv4PoolsResponse
ReadS [DescribePublicIpv4PoolsResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DescribePublicIpv4PoolsResponse]
$creadListPrec :: ReadPrec [DescribePublicIpv4PoolsResponse]
readPrec :: ReadPrec DescribePublicIpv4PoolsResponse
$creadPrec :: ReadPrec DescribePublicIpv4PoolsResponse
readList :: ReadS [DescribePublicIpv4PoolsResponse]
$creadList :: ReadS [DescribePublicIpv4PoolsResponse]
readsPrec :: Int -> ReadS DescribePublicIpv4PoolsResponse
$creadsPrec :: Int -> ReadS DescribePublicIpv4PoolsResponse
Prelude.Read, Int -> DescribePublicIpv4PoolsResponse -> ShowS
[DescribePublicIpv4PoolsResponse] -> ShowS
DescribePublicIpv4PoolsResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DescribePublicIpv4PoolsResponse] -> ShowS
$cshowList :: [DescribePublicIpv4PoolsResponse] -> ShowS
show :: DescribePublicIpv4PoolsResponse -> String
$cshow :: DescribePublicIpv4PoolsResponse -> String
showsPrec :: Int -> DescribePublicIpv4PoolsResponse -> ShowS
$cshowsPrec :: Int -> DescribePublicIpv4PoolsResponse -> ShowS
Prelude.Show, forall x.
Rep DescribePublicIpv4PoolsResponse x
-> DescribePublicIpv4PoolsResponse
forall x.
DescribePublicIpv4PoolsResponse
-> Rep DescribePublicIpv4PoolsResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DescribePublicIpv4PoolsResponse x
-> DescribePublicIpv4PoolsResponse
$cfrom :: forall x.
DescribePublicIpv4PoolsResponse
-> Rep DescribePublicIpv4PoolsResponse x
Prelude.Generic)

-- |
-- Create a value of 'DescribePublicIpv4PoolsResponse' 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:
--
-- 'nextToken', 'describePublicIpv4PoolsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'publicIpv4Pools', 'describePublicIpv4PoolsResponse_publicIpv4Pools' - Information about the address pools.
--
-- 'httpStatus', 'describePublicIpv4PoolsResponse_httpStatus' - The response's http status code.
newDescribePublicIpv4PoolsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  DescribePublicIpv4PoolsResponse
newDescribePublicIpv4PoolsResponse :: Int -> DescribePublicIpv4PoolsResponse
newDescribePublicIpv4PoolsResponse Int
pHttpStatus_ =
  DescribePublicIpv4PoolsResponse'
    { $sel:nextToken:DescribePublicIpv4PoolsResponse' :: Maybe Text
nextToken =
        forall a. Maybe a
Prelude.Nothing,
      $sel:publicIpv4Pools:DescribePublicIpv4PoolsResponse' :: Maybe [PublicIpv4Pool]
publicIpv4Pools = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:DescribePublicIpv4PoolsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
describePublicIpv4PoolsResponse_nextToken :: Lens.Lens' DescribePublicIpv4PoolsResponse (Prelude.Maybe Prelude.Text)
describePublicIpv4PoolsResponse_nextToken :: Lens' DescribePublicIpv4PoolsResponse (Maybe Text)
describePublicIpv4PoolsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4PoolsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:DescribePublicIpv4PoolsResponse' :: DescribePublicIpv4PoolsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: DescribePublicIpv4PoolsResponse
s@DescribePublicIpv4PoolsResponse' {} Maybe Text
a -> DescribePublicIpv4PoolsResponse
s {$sel:nextToken:DescribePublicIpv4PoolsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: DescribePublicIpv4PoolsResponse)

-- | Information about the address pools.
describePublicIpv4PoolsResponse_publicIpv4Pools :: Lens.Lens' DescribePublicIpv4PoolsResponse (Prelude.Maybe [PublicIpv4Pool])
describePublicIpv4PoolsResponse_publicIpv4Pools :: Lens' DescribePublicIpv4PoolsResponse (Maybe [PublicIpv4Pool])
describePublicIpv4PoolsResponse_publicIpv4Pools = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DescribePublicIpv4PoolsResponse' {Maybe [PublicIpv4Pool]
publicIpv4Pools :: Maybe [PublicIpv4Pool]
$sel:publicIpv4Pools:DescribePublicIpv4PoolsResponse' :: DescribePublicIpv4PoolsResponse -> Maybe [PublicIpv4Pool]
publicIpv4Pools} -> Maybe [PublicIpv4Pool]
publicIpv4Pools) (\s :: DescribePublicIpv4PoolsResponse
s@DescribePublicIpv4PoolsResponse' {} Maybe [PublicIpv4Pool]
a -> DescribePublicIpv4PoolsResponse
s {$sel:publicIpv4Pools:DescribePublicIpv4PoolsResponse' :: Maybe [PublicIpv4Pool]
publicIpv4Pools = Maybe [PublicIpv4Pool]
a} :: DescribePublicIpv4PoolsResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. 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 forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

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

instance
  Prelude.NFData
    DescribePublicIpv4PoolsResponse
  where
  rnf :: DescribePublicIpv4PoolsResponse -> ()
rnf DescribePublicIpv4PoolsResponse' {Int
Maybe [PublicIpv4Pool]
Maybe Text
httpStatus :: Int
publicIpv4Pools :: Maybe [PublicIpv4Pool]
nextToken :: Maybe Text
$sel:httpStatus:DescribePublicIpv4PoolsResponse' :: DescribePublicIpv4PoolsResponse -> Int
$sel:publicIpv4Pools:DescribePublicIpv4PoolsResponse' :: DescribePublicIpv4PoolsResponse -> Maybe [PublicIpv4Pool]
$sel:nextToken:DescribePublicIpv4PoolsResponse' :: DescribePublicIpv4PoolsResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [PublicIpv4Pool]
publicIpv4Pools
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus