{-# 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.GetAssociatedIpv6PoolCidrs
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about the IPv6 CIDR block associations for a specified
-- IPv6 address pool.
--
-- This operation returns paginated results.
module Amazonka.EC2.GetAssociatedIpv6PoolCidrs
  ( -- * Creating a Request
    GetAssociatedIpv6PoolCidrs (..),
    newGetAssociatedIpv6PoolCidrs,

    -- * Request Lenses
    getAssociatedIpv6PoolCidrs_dryRun,
    getAssociatedIpv6PoolCidrs_maxResults,
    getAssociatedIpv6PoolCidrs_nextToken,
    getAssociatedIpv6PoolCidrs_poolId,

    -- * Destructuring the Response
    GetAssociatedIpv6PoolCidrsResponse (..),
    newGetAssociatedIpv6PoolCidrsResponse,

    -- * Response Lenses
    getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations,
    getAssociatedIpv6PoolCidrsResponse_nextToken,
    getAssociatedIpv6PoolCidrsResponse_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:/ 'newGetAssociatedIpv6PoolCidrs' smart constructor.
data GetAssociatedIpv6PoolCidrs = GetAssociatedIpv6PoolCidrs'
  { -- | Checks whether you have the required permissions for the action, without
    -- actually making the request, and provides an error response. If you have
    -- the required permissions, the error response is @DryRunOperation@.
    -- Otherwise, it is @UnauthorizedOperation@.
    GetAssociatedIpv6PoolCidrs -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The maximum number of results to return with a single call. To retrieve
    -- the remaining results, make another call with the returned @nextToken@
    -- value.
    GetAssociatedIpv6PoolCidrs -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    GetAssociatedIpv6PoolCidrs -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the IPv6 address pool.
    GetAssociatedIpv6PoolCidrs -> Text
poolId :: Prelude.Text
  }
  deriving (GetAssociatedIpv6PoolCidrs -> GetAssociatedIpv6PoolCidrs -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetAssociatedIpv6PoolCidrs -> GetAssociatedIpv6PoolCidrs -> Bool
$c/= :: GetAssociatedIpv6PoolCidrs -> GetAssociatedIpv6PoolCidrs -> Bool
== :: GetAssociatedIpv6PoolCidrs -> GetAssociatedIpv6PoolCidrs -> Bool
$c== :: GetAssociatedIpv6PoolCidrs -> GetAssociatedIpv6PoolCidrs -> Bool
Prelude.Eq, ReadPrec [GetAssociatedIpv6PoolCidrs]
ReadPrec GetAssociatedIpv6PoolCidrs
Int -> ReadS GetAssociatedIpv6PoolCidrs
ReadS [GetAssociatedIpv6PoolCidrs]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetAssociatedIpv6PoolCidrs]
$creadListPrec :: ReadPrec [GetAssociatedIpv6PoolCidrs]
readPrec :: ReadPrec GetAssociatedIpv6PoolCidrs
$creadPrec :: ReadPrec GetAssociatedIpv6PoolCidrs
readList :: ReadS [GetAssociatedIpv6PoolCidrs]
$creadList :: ReadS [GetAssociatedIpv6PoolCidrs]
readsPrec :: Int -> ReadS GetAssociatedIpv6PoolCidrs
$creadsPrec :: Int -> ReadS GetAssociatedIpv6PoolCidrs
Prelude.Read, Int -> GetAssociatedIpv6PoolCidrs -> ShowS
[GetAssociatedIpv6PoolCidrs] -> ShowS
GetAssociatedIpv6PoolCidrs -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetAssociatedIpv6PoolCidrs] -> ShowS
$cshowList :: [GetAssociatedIpv6PoolCidrs] -> ShowS
show :: GetAssociatedIpv6PoolCidrs -> String
$cshow :: GetAssociatedIpv6PoolCidrs -> String
showsPrec :: Int -> GetAssociatedIpv6PoolCidrs -> ShowS
$cshowsPrec :: Int -> GetAssociatedIpv6PoolCidrs -> ShowS
Prelude.Show, forall x.
Rep GetAssociatedIpv6PoolCidrs x -> GetAssociatedIpv6PoolCidrs
forall x.
GetAssociatedIpv6PoolCidrs -> Rep GetAssociatedIpv6PoolCidrs x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetAssociatedIpv6PoolCidrs x -> GetAssociatedIpv6PoolCidrs
$cfrom :: forall x.
GetAssociatedIpv6PoolCidrs -> Rep GetAssociatedIpv6PoolCidrs x
Prelude.Generic)

-- |
-- Create a value of 'GetAssociatedIpv6PoolCidrs' 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:
--
-- 'dryRun', 'getAssociatedIpv6PoolCidrs_dryRun' - Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
--
-- 'maxResults', 'getAssociatedIpv6PoolCidrs_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', 'getAssociatedIpv6PoolCidrs_nextToken' - The token for the next page of results.
--
-- 'poolId', 'getAssociatedIpv6PoolCidrs_poolId' - The ID of the IPv6 address pool.
newGetAssociatedIpv6PoolCidrs ::
  -- | 'poolId'
  Prelude.Text ->
  GetAssociatedIpv6PoolCidrs
newGetAssociatedIpv6PoolCidrs :: Text -> GetAssociatedIpv6PoolCidrs
newGetAssociatedIpv6PoolCidrs Text
pPoolId_ =
  GetAssociatedIpv6PoolCidrs'
    { $sel:dryRun:GetAssociatedIpv6PoolCidrs' :: Maybe Bool
dryRun =
        forall a. Maybe a
Prelude.Nothing,
      $sel:maxResults:GetAssociatedIpv6PoolCidrs' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetAssociatedIpv6PoolCidrs' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:poolId:GetAssociatedIpv6PoolCidrs' :: Text
poolId = Text
pPoolId_
    }

-- | Checks whether you have the required permissions for the action, without
-- actually making the request, and provides an error response. If you have
-- the required permissions, the error response is @DryRunOperation@.
-- Otherwise, it is @UnauthorizedOperation@.
getAssociatedIpv6PoolCidrs_dryRun :: Lens.Lens' GetAssociatedIpv6PoolCidrs (Prelude.Maybe Prelude.Bool)
getAssociatedIpv6PoolCidrs_dryRun :: Lens' GetAssociatedIpv6PoolCidrs (Maybe Bool)
getAssociatedIpv6PoolCidrs_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociatedIpv6PoolCidrs' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: GetAssociatedIpv6PoolCidrs
s@GetAssociatedIpv6PoolCidrs' {} Maybe Bool
a -> GetAssociatedIpv6PoolCidrs
s {$sel:dryRun:GetAssociatedIpv6PoolCidrs' :: Maybe Bool
dryRun = Maybe Bool
a} :: GetAssociatedIpv6PoolCidrs)

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

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

-- | The ID of the IPv6 address pool.
getAssociatedIpv6PoolCidrs_poolId :: Lens.Lens' GetAssociatedIpv6PoolCidrs Prelude.Text
getAssociatedIpv6PoolCidrs_poolId :: Lens' GetAssociatedIpv6PoolCidrs Text
getAssociatedIpv6PoolCidrs_poolId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociatedIpv6PoolCidrs' {Text
poolId :: Text
$sel:poolId:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Text
poolId} -> Text
poolId) (\s :: GetAssociatedIpv6PoolCidrs
s@GetAssociatedIpv6PoolCidrs' {} Text
a -> GetAssociatedIpv6PoolCidrs
s {$sel:poolId:GetAssociatedIpv6PoolCidrs' :: Text
poolId = Text
a} :: GetAssociatedIpv6PoolCidrs)

instance Core.AWSPager GetAssociatedIpv6PoolCidrs where
  page :: GetAssociatedIpv6PoolCidrs
-> AWSResponse GetAssociatedIpv6PoolCidrs
-> Maybe GetAssociatedIpv6PoolCidrs
page GetAssociatedIpv6PoolCidrs
rq AWSResponse GetAssociatedIpv6PoolCidrs
rs
    | forall a. AWSTruncated a => a -> Bool
Core.stop
        ( AWSResponse GetAssociatedIpv6PoolCidrs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAssociatedIpv6PoolCidrsResponse (Maybe Text)
getAssociatedIpv6PoolCidrsResponse_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 GetAssociatedIpv6PoolCidrs
rs
            forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens'
  GetAssociatedIpv6PoolCidrsResponse (Maybe [Ipv6CidrAssociation])
getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations
            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.$ GetAssociatedIpv6PoolCidrs
rq
          forall a b. a -> (a -> b) -> b
Prelude.& Lens' GetAssociatedIpv6PoolCidrs (Maybe Text)
getAssociatedIpv6PoolCidrs_nextToken
          forall s t a b. ASetter s t a b -> b -> s -> t
Lens..~ AWSResponse GetAssociatedIpv6PoolCidrs
rs
          forall s a. s -> Getting (First a) s a -> Maybe a
Lens.^? Lens' GetAssociatedIpv6PoolCidrsResponse (Maybe Text)
getAssociatedIpv6PoolCidrsResponse_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 GetAssociatedIpv6PoolCidrs where
  type
    AWSResponse GetAssociatedIpv6PoolCidrs =
      GetAssociatedIpv6PoolCidrsResponse
  request :: (Service -> Service)
-> GetAssociatedIpv6PoolCidrs -> Request GetAssociatedIpv6PoolCidrs
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 GetAssociatedIpv6PoolCidrs
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse GetAssociatedIpv6PoolCidrs)))
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 [Ipv6CidrAssociation]
-> Maybe Text -> Int -> GetAssociatedIpv6PoolCidrsResponse
GetAssociatedIpv6PoolCidrsResponse'
            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
"ipv6CidrAssociationSet"
                            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.<*> ([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.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
      )

instance Prelude.Hashable GetAssociatedIpv6PoolCidrs where
  hashWithSalt :: Int -> GetAssociatedIpv6PoolCidrs -> Int
hashWithSalt Int
_salt GetAssociatedIpv6PoolCidrs' {Maybe Bool
Maybe Natural
Maybe Text
Text
poolId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:poolId:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Text
$sel:nextToken:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Text
$sel:maxResults:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Natural
$sel:dryRun:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Bool
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Bool
dryRun
      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` Text
poolId

instance Prelude.NFData GetAssociatedIpv6PoolCidrs where
  rnf :: GetAssociatedIpv6PoolCidrs -> ()
rnf GetAssociatedIpv6PoolCidrs' {Maybe Bool
Maybe Natural
Maybe Text
Text
poolId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:poolId:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Text
$sel:nextToken:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Text
$sel:maxResults:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Natural
$sel:dryRun:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Bool
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Bool
dryRun
      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 Text
poolId

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

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

instance Data.ToQuery GetAssociatedIpv6PoolCidrs where
  toQuery :: GetAssociatedIpv6PoolCidrs -> QueryString
toQuery GetAssociatedIpv6PoolCidrs' {Maybe Bool
Maybe Natural
Maybe Text
Text
poolId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
dryRun :: Maybe Bool
$sel:poolId:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Text
$sel:nextToken:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Text
$sel:maxResults:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Natural
$sel:dryRun:GetAssociatedIpv6PoolCidrs' :: GetAssociatedIpv6PoolCidrs -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"GetAssociatedIpv6PoolCidrs" :: Prelude.ByteString),
        ByteString
"Version"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: (ByteString
"2016-11-15" :: Prelude.ByteString),
        ByteString
"DryRun" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Bool
dryRun,
        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,
        ByteString
"PoolId" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
poolId
      ]

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

-- |
-- Create a value of 'GetAssociatedIpv6PoolCidrsResponse' 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:
--
-- 'ipv6CidrAssociations', 'getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations' - Information about the IPv6 CIDR block associations.
--
-- 'nextToken', 'getAssociatedIpv6PoolCidrsResponse_nextToken' - The token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
--
-- 'httpStatus', 'getAssociatedIpv6PoolCidrsResponse_httpStatus' - The response's http status code.
newGetAssociatedIpv6PoolCidrsResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetAssociatedIpv6PoolCidrsResponse
newGetAssociatedIpv6PoolCidrsResponse :: Int -> GetAssociatedIpv6PoolCidrsResponse
newGetAssociatedIpv6PoolCidrsResponse Int
pHttpStatus_ =
  GetAssociatedIpv6PoolCidrsResponse'
    { $sel:ipv6CidrAssociations:GetAssociatedIpv6PoolCidrsResponse' :: Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations =
        forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:GetAssociatedIpv6PoolCidrsResponse' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:httpStatus:GetAssociatedIpv6PoolCidrsResponse' :: Int
httpStatus = Int
pHttpStatus_
    }

-- | Information about the IPv6 CIDR block associations.
getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations :: Lens.Lens' GetAssociatedIpv6PoolCidrsResponse (Prelude.Maybe [Ipv6CidrAssociation])
getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations :: Lens'
  GetAssociatedIpv6PoolCidrsResponse (Maybe [Ipv6CidrAssociation])
getAssociatedIpv6PoolCidrsResponse_ipv6CidrAssociations = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociatedIpv6PoolCidrsResponse' {Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations :: Maybe [Ipv6CidrAssociation]
$sel:ipv6CidrAssociations:GetAssociatedIpv6PoolCidrsResponse' :: GetAssociatedIpv6PoolCidrsResponse -> Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations} -> Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations) (\s :: GetAssociatedIpv6PoolCidrsResponse
s@GetAssociatedIpv6PoolCidrsResponse' {} Maybe [Ipv6CidrAssociation]
a -> GetAssociatedIpv6PoolCidrsResponse
s {$sel:ipv6CidrAssociations:GetAssociatedIpv6PoolCidrsResponse' :: Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations = Maybe [Ipv6CidrAssociation]
a} :: GetAssociatedIpv6PoolCidrsResponse) 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 token to use to retrieve the next page of results. This value is
-- @null@ when there are no more results to return.
getAssociatedIpv6PoolCidrsResponse_nextToken :: Lens.Lens' GetAssociatedIpv6PoolCidrsResponse (Prelude.Maybe Prelude.Text)
getAssociatedIpv6PoolCidrsResponse_nextToken :: Lens' GetAssociatedIpv6PoolCidrsResponse (Maybe Text)
getAssociatedIpv6PoolCidrsResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetAssociatedIpv6PoolCidrsResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:GetAssociatedIpv6PoolCidrsResponse' :: GetAssociatedIpv6PoolCidrsResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: GetAssociatedIpv6PoolCidrsResponse
s@GetAssociatedIpv6PoolCidrsResponse' {} Maybe Text
a -> GetAssociatedIpv6PoolCidrsResponse
s {$sel:nextToken:GetAssociatedIpv6PoolCidrsResponse' :: Maybe Text
nextToken = Maybe Text
a} :: GetAssociatedIpv6PoolCidrsResponse)

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

instance
  Prelude.NFData
    GetAssociatedIpv6PoolCidrsResponse
  where
  rnf :: GetAssociatedIpv6PoolCidrsResponse -> ()
rnf GetAssociatedIpv6PoolCidrsResponse' {Int
Maybe [Ipv6CidrAssociation]
Maybe Text
httpStatus :: Int
nextToken :: Maybe Text
ipv6CidrAssociations :: Maybe [Ipv6CidrAssociation]
$sel:httpStatus:GetAssociatedIpv6PoolCidrsResponse' :: GetAssociatedIpv6PoolCidrsResponse -> Int
$sel:nextToken:GetAssociatedIpv6PoolCidrsResponse' :: GetAssociatedIpv6PoolCidrsResponse -> Maybe Text
$sel:ipv6CidrAssociations:GetAssociatedIpv6PoolCidrsResponse' :: GetAssociatedIpv6PoolCidrsResponse -> Maybe [Ipv6CidrAssociation]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [Ipv6CidrAssociation]
ipv6CidrAssociations
      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 Int
httpStatus