{-# 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.GetTransitGatewayPolicyTableEntries
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Returns a list of transit gateway policy table entries.
module Amazonka.EC2.GetTransitGatewayPolicyTableEntries
  ( -- * Creating a Request
    GetTransitGatewayPolicyTableEntries (..),
    newGetTransitGatewayPolicyTableEntries,

    -- * Request Lenses
    getTransitGatewayPolicyTableEntries_dryRun,
    getTransitGatewayPolicyTableEntries_filters,
    getTransitGatewayPolicyTableEntries_maxResults,
    getTransitGatewayPolicyTableEntries_nextToken,
    getTransitGatewayPolicyTableEntries_transitGatewayPolicyTableId,

    -- * Destructuring the Response
    GetTransitGatewayPolicyTableEntriesResponse (..),
    newGetTransitGatewayPolicyTableEntriesResponse,

    -- * Response Lenses
    getTransitGatewayPolicyTableEntriesResponse_transitGatewayPolicyTableEntries,
    getTransitGatewayPolicyTableEntriesResponse_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:/ 'newGetTransitGatewayPolicyTableEntries' smart constructor.
data GetTransitGatewayPolicyTableEntries = GetTransitGatewayPolicyTableEntries'
  { -- | 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@.
    GetTransitGatewayPolicyTableEntries -> Maybe Bool
dryRun :: Prelude.Maybe Prelude.Bool,
    -- | The filters associated with the transit gateway policy table.
    GetTransitGatewayPolicyTableEntries -> 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.
    GetTransitGatewayPolicyTableEntries -> Maybe Natural
maxResults :: Prelude.Maybe Prelude.Natural,
    -- | The token for the next page of results.
    GetTransitGatewayPolicyTableEntries -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the transit gateway policy table.
    GetTransitGatewayPolicyTableEntries -> Text
transitGatewayPolicyTableId :: Prelude.Text
  }
  deriving (GetTransitGatewayPolicyTableEntries
-> GetTransitGatewayPolicyTableEntries -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTransitGatewayPolicyTableEntries
-> GetTransitGatewayPolicyTableEntries -> Bool
$c/= :: GetTransitGatewayPolicyTableEntries
-> GetTransitGatewayPolicyTableEntries -> Bool
== :: GetTransitGatewayPolicyTableEntries
-> GetTransitGatewayPolicyTableEntries -> Bool
$c== :: GetTransitGatewayPolicyTableEntries
-> GetTransitGatewayPolicyTableEntries -> Bool
Prelude.Eq, ReadPrec [GetTransitGatewayPolicyTableEntries]
ReadPrec GetTransitGatewayPolicyTableEntries
Int -> ReadS GetTransitGatewayPolicyTableEntries
ReadS [GetTransitGatewayPolicyTableEntries]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTransitGatewayPolicyTableEntries]
$creadListPrec :: ReadPrec [GetTransitGatewayPolicyTableEntries]
readPrec :: ReadPrec GetTransitGatewayPolicyTableEntries
$creadPrec :: ReadPrec GetTransitGatewayPolicyTableEntries
readList :: ReadS [GetTransitGatewayPolicyTableEntries]
$creadList :: ReadS [GetTransitGatewayPolicyTableEntries]
readsPrec :: Int -> ReadS GetTransitGatewayPolicyTableEntries
$creadsPrec :: Int -> ReadS GetTransitGatewayPolicyTableEntries
Prelude.Read, Int -> GetTransitGatewayPolicyTableEntries -> ShowS
[GetTransitGatewayPolicyTableEntries] -> ShowS
GetTransitGatewayPolicyTableEntries -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTransitGatewayPolicyTableEntries] -> ShowS
$cshowList :: [GetTransitGatewayPolicyTableEntries] -> ShowS
show :: GetTransitGatewayPolicyTableEntries -> String
$cshow :: GetTransitGatewayPolicyTableEntries -> String
showsPrec :: Int -> GetTransitGatewayPolicyTableEntries -> ShowS
$cshowsPrec :: Int -> GetTransitGatewayPolicyTableEntries -> ShowS
Prelude.Show, forall x.
Rep GetTransitGatewayPolicyTableEntries x
-> GetTransitGatewayPolicyTableEntries
forall x.
GetTransitGatewayPolicyTableEntries
-> Rep GetTransitGatewayPolicyTableEntries x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetTransitGatewayPolicyTableEntries x
-> GetTransitGatewayPolicyTableEntries
$cfrom :: forall x.
GetTransitGatewayPolicyTableEntries
-> Rep GetTransitGatewayPolicyTableEntries x
Prelude.Generic)

-- |
-- Create a value of 'GetTransitGatewayPolicyTableEntries' 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', 'getTransitGatewayPolicyTableEntries_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@.
--
-- 'filters', 'getTransitGatewayPolicyTableEntries_filters' - The filters associated with the transit gateway policy table.
--
-- 'maxResults', 'getTransitGatewayPolicyTableEntries_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', 'getTransitGatewayPolicyTableEntries_nextToken' - The token for the next page of results.
--
-- 'transitGatewayPolicyTableId', 'getTransitGatewayPolicyTableEntries_transitGatewayPolicyTableId' - The ID of the transit gateway policy table.
newGetTransitGatewayPolicyTableEntries ::
  -- | 'transitGatewayPolicyTableId'
  Prelude.Text ->
  GetTransitGatewayPolicyTableEntries
newGetTransitGatewayPolicyTableEntries :: Text -> GetTransitGatewayPolicyTableEntries
newGetTransitGatewayPolicyTableEntries
  Text
pTransitGatewayPolicyTableId_ =
    GetTransitGatewayPolicyTableEntries'
      { $sel:dryRun:GetTransitGatewayPolicyTableEntries' :: Maybe Bool
dryRun =
          forall a. Maybe a
Prelude.Nothing,
        $sel:filters:GetTransitGatewayPolicyTableEntries' :: Maybe [Filter]
filters = forall a. Maybe a
Prelude.Nothing,
        $sel:maxResults:GetTransitGatewayPolicyTableEntries' :: Maybe Natural
maxResults = forall a. Maybe a
Prelude.Nothing,
        $sel:nextToken:GetTransitGatewayPolicyTableEntries' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
        $sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: Text
transitGatewayPolicyTableId =
          Text
pTransitGatewayPolicyTableId_
      }

-- | 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@.
getTransitGatewayPolicyTableEntries_dryRun :: Lens.Lens' GetTransitGatewayPolicyTableEntries (Prelude.Maybe Prelude.Bool)
getTransitGatewayPolicyTableEntries_dryRun :: Lens' GetTransitGatewayPolicyTableEntries (Maybe Bool)
getTransitGatewayPolicyTableEntries_dryRun = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntries' {Maybe Bool
dryRun :: Maybe Bool
$sel:dryRun:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Bool
dryRun} -> Maybe Bool
dryRun) (\s :: GetTransitGatewayPolicyTableEntries
s@GetTransitGatewayPolicyTableEntries' {} Maybe Bool
a -> GetTransitGatewayPolicyTableEntries
s {$sel:dryRun:GetTransitGatewayPolicyTableEntries' :: Maybe Bool
dryRun = Maybe Bool
a} :: GetTransitGatewayPolicyTableEntries)

-- | The filters associated with the transit gateway policy table.
getTransitGatewayPolicyTableEntries_filters :: Lens.Lens' GetTransitGatewayPolicyTableEntries (Prelude.Maybe [Filter])
getTransitGatewayPolicyTableEntries_filters :: Lens' GetTransitGatewayPolicyTableEntries (Maybe [Filter])
getTransitGatewayPolicyTableEntries_filters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntries' {Maybe [Filter]
filters :: Maybe [Filter]
$sel:filters:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe [Filter]
filters} -> Maybe [Filter]
filters) (\s :: GetTransitGatewayPolicyTableEntries
s@GetTransitGatewayPolicyTableEntries' {} Maybe [Filter]
a -> GetTransitGatewayPolicyTableEntries
s {$sel:filters:GetTransitGatewayPolicyTableEntries' :: Maybe [Filter]
filters = Maybe [Filter]
a} :: GetTransitGatewayPolicyTableEntries) 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.
getTransitGatewayPolicyTableEntries_maxResults :: Lens.Lens' GetTransitGatewayPolicyTableEntries (Prelude.Maybe Prelude.Natural)
getTransitGatewayPolicyTableEntries_maxResults :: Lens' GetTransitGatewayPolicyTableEntries (Maybe Natural)
getTransitGatewayPolicyTableEntries_maxResults = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntries' {Maybe Natural
maxResults :: Maybe Natural
$sel:maxResults:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Natural
maxResults} -> Maybe Natural
maxResults) (\s :: GetTransitGatewayPolicyTableEntries
s@GetTransitGatewayPolicyTableEntries' {} Maybe Natural
a -> GetTransitGatewayPolicyTableEntries
s {$sel:maxResults:GetTransitGatewayPolicyTableEntries' :: Maybe Natural
maxResults = Maybe Natural
a} :: GetTransitGatewayPolicyTableEntries)

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

-- | The ID of the transit gateway policy table.
getTransitGatewayPolicyTableEntries_transitGatewayPolicyTableId :: Lens.Lens' GetTransitGatewayPolicyTableEntries Prelude.Text
getTransitGatewayPolicyTableEntries_transitGatewayPolicyTableId :: Lens' GetTransitGatewayPolicyTableEntries Text
getTransitGatewayPolicyTableEntries_transitGatewayPolicyTableId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntries' {Text
transitGatewayPolicyTableId :: Text
$sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Text
transitGatewayPolicyTableId} -> Text
transitGatewayPolicyTableId) (\s :: GetTransitGatewayPolicyTableEntries
s@GetTransitGatewayPolicyTableEntries' {} Text
a -> GetTransitGatewayPolicyTableEntries
s {$sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: Text
transitGatewayPolicyTableId = Text
a} :: GetTransitGatewayPolicyTableEntries)

instance
  Core.AWSRequest
    GetTransitGatewayPolicyTableEntries
  where
  type
    AWSResponse GetTransitGatewayPolicyTableEntries =
      GetTransitGatewayPolicyTableEntriesResponse
  request :: (Service -> Service)
-> GetTransitGatewayPolicyTableEntries
-> Request GetTransitGatewayPolicyTableEntries
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 GetTransitGatewayPolicyTableEntries
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse GetTransitGatewayPolicyTableEntries)))
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 [TransitGatewayPolicyTableEntry]
-> Int -> GetTransitGatewayPolicyTableEntriesResponse
GetTransitGatewayPolicyTableEntriesResponse'
            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
"transitGatewayPolicyTableEntries"
                            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
    GetTransitGatewayPolicyTableEntries
  where
  hashWithSalt :: Int -> GetTransitGatewayPolicyTableEntries -> Int
hashWithSalt
    Int
_salt
    GetTransitGatewayPolicyTableEntries' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe Text
Text
transitGatewayPolicyTableId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Text
$sel:nextToken:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Text
$sel:maxResults:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Natural
$sel:filters:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe [Filter]
$sel:dryRun:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> 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 [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` Text
transitGatewayPolicyTableId

instance
  Prelude.NFData
    GetTransitGatewayPolicyTableEntries
  where
  rnf :: GetTransitGatewayPolicyTableEntries -> ()
rnf GetTransitGatewayPolicyTableEntries' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe Text
Text
transitGatewayPolicyTableId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Text
$sel:nextToken:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Text
$sel:maxResults:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Natural
$sel:filters:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe [Filter]
$sel:dryRun:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> 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 [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 Text
transitGatewayPolicyTableId

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

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

instance
  Data.ToQuery
    GetTransitGatewayPolicyTableEntries
  where
  toQuery :: GetTransitGatewayPolicyTableEntries -> QueryString
toQuery GetTransitGatewayPolicyTableEntries' {Maybe Bool
Maybe Natural
Maybe [Filter]
Maybe Text
Text
transitGatewayPolicyTableId :: Text
nextToken :: Maybe Text
maxResults :: Maybe Natural
filters :: Maybe [Filter]
dryRun :: Maybe Bool
$sel:transitGatewayPolicyTableId:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Text
$sel:nextToken:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Text
$sel:maxResults:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Natural
$sel:filters:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe [Filter]
$sel:dryRun:GetTransitGatewayPolicyTableEntries' :: GetTransitGatewayPolicyTableEntries -> Maybe Bool
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"Action"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: ( ByteString
"GetTransitGatewayPolicyTableEntries" ::
                      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,
        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,
        ByteString
"TransitGatewayPolicyTableId"
          forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
transitGatewayPolicyTableId
      ]

-- | /See:/ 'newGetTransitGatewayPolicyTableEntriesResponse' smart constructor.
data GetTransitGatewayPolicyTableEntriesResponse = GetTransitGatewayPolicyTableEntriesResponse'
  { -- | The entries for the transit gateway policy table.
    GetTransitGatewayPolicyTableEntriesResponse
-> Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries :: Prelude.Maybe [TransitGatewayPolicyTableEntry],
    -- | The response's http status code.
    GetTransitGatewayPolicyTableEntriesResponse -> Int
httpStatus :: Prelude.Int
  }
  deriving (GetTransitGatewayPolicyTableEntriesResponse
-> GetTransitGatewayPolicyTableEntriesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: GetTransitGatewayPolicyTableEntriesResponse
-> GetTransitGatewayPolicyTableEntriesResponse -> Bool
$c/= :: GetTransitGatewayPolicyTableEntriesResponse
-> GetTransitGatewayPolicyTableEntriesResponse -> Bool
== :: GetTransitGatewayPolicyTableEntriesResponse
-> GetTransitGatewayPolicyTableEntriesResponse -> Bool
$c== :: GetTransitGatewayPolicyTableEntriesResponse
-> GetTransitGatewayPolicyTableEntriesResponse -> Bool
Prelude.Eq, ReadPrec [GetTransitGatewayPolicyTableEntriesResponse]
ReadPrec GetTransitGatewayPolicyTableEntriesResponse
Int -> ReadS GetTransitGatewayPolicyTableEntriesResponse
ReadS [GetTransitGatewayPolicyTableEntriesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [GetTransitGatewayPolicyTableEntriesResponse]
$creadListPrec :: ReadPrec [GetTransitGatewayPolicyTableEntriesResponse]
readPrec :: ReadPrec GetTransitGatewayPolicyTableEntriesResponse
$creadPrec :: ReadPrec GetTransitGatewayPolicyTableEntriesResponse
readList :: ReadS [GetTransitGatewayPolicyTableEntriesResponse]
$creadList :: ReadS [GetTransitGatewayPolicyTableEntriesResponse]
readsPrec :: Int -> ReadS GetTransitGatewayPolicyTableEntriesResponse
$creadsPrec :: Int -> ReadS GetTransitGatewayPolicyTableEntriesResponse
Prelude.Read, Int -> GetTransitGatewayPolicyTableEntriesResponse -> ShowS
[GetTransitGatewayPolicyTableEntriesResponse] -> ShowS
GetTransitGatewayPolicyTableEntriesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [GetTransitGatewayPolicyTableEntriesResponse] -> ShowS
$cshowList :: [GetTransitGatewayPolicyTableEntriesResponse] -> ShowS
show :: GetTransitGatewayPolicyTableEntriesResponse -> String
$cshow :: GetTransitGatewayPolicyTableEntriesResponse -> String
showsPrec :: Int -> GetTransitGatewayPolicyTableEntriesResponse -> ShowS
$cshowsPrec :: Int -> GetTransitGatewayPolicyTableEntriesResponse -> ShowS
Prelude.Show, forall x.
Rep GetTransitGatewayPolicyTableEntriesResponse x
-> GetTransitGatewayPolicyTableEntriesResponse
forall x.
GetTransitGatewayPolicyTableEntriesResponse
-> Rep GetTransitGatewayPolicyTableEntriesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep GetTransitGatewayPolicyTableEntriesResponse x
-> GetTransitGatewayPolicyTableEntriesResponse
$cfrom :: forall x.
GetTransitGatewayPolicyTableEntriesResponse
-> Rep GetTransitGatewayPolicyTableEntriesResponse x
Prelude.Generic)

-- |
-- Create a value of 'GetTransitGatewayPolicyTableEntriesResponse' 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:
--
-- 'transitGatewayPolicyTableEntries', 'getTransitGatewayPolicyTableEntriesResponse_transitGatewayPolicyTableEntries' - The entries for the transit gateway policy table.
--
-- 'httpStatus', 'getTransitGatewayPolicyTableEntriesResponse_httpStatus' - The response's http status code.
newGetTransitGatewayPolicyTableEntriesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  GetTransitGatewayPolicyTableEntriesResponse
newGetTransitGatewayPolicyTableEntriesResponse :: Int -> GetTransitGatewayPolicyTableEntriesResponse
newGetTransitGatewayPolicyTableEntriesResponse
  Int
pHttpStatus_ =
    GetTransitGatewayPolicyTableEntriesResponse'
      { $sel:transitGatewayPolicyTableEntries:GetTransitGatewayPolicyTableEntriesResponse' :: Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:GetTransitGatewayPolicyTableEntriesResponse' :: Int
httpStatus = Int
pHttpStatus_
      }

-- | The entries for the transit gateway policy table.
getTransitGatewayPolicyTableEntriesResponse_transitGatewayPolicyTableEntries :: Lens.Lens' GetTransitGatewayPolicyTableEntriesResponse (Prelude.Maybe [TransitGatewayPolicyTableEntry])
getTransitGatewayPolicyTableEntriesResponse_transitGatewayPolicyTableEntries :: Lens'
  GetTransitGatewayPolicyTableEntriesResponse
  (Maybe [TransitGatewayPolicyTableEntry])
getTransitGatewayPolicyTableEntriesResponse_transitGatewayPolicyTableEntries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntriesResponse' {Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries :: Maybe [TransitGatewayPolicyTableEntry]
$sel:transitGatewayPolicyTableEntries:GetTransitGatewayPolicyTableEntriesResponse' :: GetTransitGatewayPolicyTableEntriesResponse
-> Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries} -> Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries) (\s :: GetTransitGatewayPolicyTableEntriesResponse
s@GetTransitGatewayPolicyTableEntriesResponse' {} Maybe [TransitGatewayPolicyTableEntry]
a -> GetTransitGatewayPolicyTableEntriesResponse
s {$sel:transitGatewayPolicyTableEntries:GetTransitGatewayPolicyTableEntriesResponse' :: Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries = Maybe [TransitGatewayPolicyTableEntry]
a} :: GetTransitGatewayPolicyTableEntriesResponse) 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.
getTransitGatewayPolicyTableEntriesResponse_httpStatus :: Lens.Lens' GetTransitGatewayPolicyTableEntriesResponse Prelude.Int
getTransitGatewayPolicyTableEntriesResponse_httpStatus :: Lens' GetTransitGatewayPolicyTableEntriesResponse Int
getTransitGatewayPolicyTableEntriesResponse_httpStatus = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\GetTransitGatewayPolicyTableEntriesResponse' {Int
httpStatus :: Int
$sel:httpStatus:GetTransitGatewayPolicyTableEntriesResponse' :: GetTransitGatewayPolicyTableEntriesResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: GetTransitGatewayPolicyTableEntriesResponse
s@GetTransitGatewayPolicyTableEntriesResponse' {} Int
a -> GetTransitGatewayPolicyTableEntriesResponse
s {$sel:httpStatus:GetTransitGatewayPolicyTableEntriesResponse' :: Int
httpStatus = Int
a} :: GetTransitGatewayPolicyTableEntriesResponse)

instance
  Prelude.NFData
    GetTransitGatewayPolicyTableEntriesResponse
  where
  rnf :: GetTransitGatewayPolicyTableEntriesResponse -> ()
rnf GetTransitGatewayPolicyTableEntriesResponse' {Int
Maybe [TransitGatewayPolicyTableEntry]
httpStatus :: Int
transitGatewayPolicyTableEntries :: Maybe [TransitGatewayPolicyTableEntry]
$sel:httpStatus:GetTransitGatewayPolicyTableEntriesResponse' :: GetTransitGatewayPolicyTableEntriesResponse -> Int
$sel:transitGatewayPolicyTableEntries:GetTransitGatewayPolicyTableEntriesResponse' :: GetTransitGatewayPolicyTableEntriesResponse
-> Maybe [TransitGatewayPolicyTableEntry]
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe [TransitGatewayPolicyTableEntry]
transitGatewayPolicyTableEntries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus