{-# 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.Route53.ListTrafficPolicies
-- 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 latest version for every traffic policy that
-- is associated with the current Amazon Web Services account. Policies are
-- listed in the order that they were created in.
--
-- For information about how of deleting a traffic policy affects the
-- response from @ListTrafficPolicies@, see
-- <https://docs.aws.amazon.com/Route53/latest/APIReference/API_DeleteTrafficPolicy.html DeleteTrafficPolicy>.
module Amazonka.Route53.ListTrafficPolicies
  ( -- * Creating a Request
    ListTrafficPolicies (..),
    newListTrafficPolicies,

    -- * Request Lenses
    listTrafficPolicies_maxItems,
    listTrafficPolicies_trafficPolicyIdMarker,

    -- * Destructuring the Response
    ListTrafficPoliciesResponse (..),
    newListTrafficPoliciesResponse,

    -- * Response Lenses
    listTrafficPoliciesResponse_httpStatus,
    listTrafficPoliciesResponse_trafficPolicySummaries,
    listTrafficPoliciesResponse_isTruncated,
    listTrafficPoliciesResponse_trafficPolicyIdMarker,
    listTrafficPoliciesResponse_maxItems,
  )
where

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

-- | A complex type that contains the information about the request to list
-- the traffic policies that are associated with the current Amazon Web
-- Services account.
--
-- /See:/ 'newListTrafficPolicies' smart constructor.
data ListTrafficPolicies = ListTrafficPolicies'
  { -- | (Optional) The maximum number of traffic policies that you want Amazon
    -- Route 53 to return in response to this request. If you have more than
    -- @MaxItems@ traffic policies, the value of @IsTruncated@ in the response
    -- is @true@, and the value of @TrafficPolicyIdMarker@ is the ID of the
    -- first traffic policy that Route 53 will return if you submit another
    -- request.
    ListTrafficPolicies -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | (Conditional) For your first request to @ListTrafficPolicies@, don\'t
    -- include the @TrafficPolicyIdMarker@ parameter.
    --
    -- If you have more traffic policies than the value of @MaxItems@,
    -- @ListTrafficPolicies@ returns only the first @MaxItems@ traffic
    -- policies. To get the next group of policies, submit another request to
    -- @ListTrafficPolicies@. For the value of @TrafficPolicyIdMarker@, specify
    -- the value of @TrafficPolicyIdMarker@ that was returned in the previous
    -- response.
    ListTrafficPolicies -> Maybe Text
trafficPolicyIdMarker :: Prelude.Maybe Prelude.Text
  }
  deriving (ListTrafficPolicies -> ListTrafficPolicies -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPolicies -> ListTrafficPolicies -> Bool
$c/= :: ListTrafficPolicies -> ListTrafficPolicies -> Bool
== :: ListTrafficPolicies -> ListTrafficPolicies -> Bool
$c== :: ListTrafficPolicies -> ListTrafficPolicies -> Bool
Prelude.Eq, ReadPrec [ListTrafficPolicies]
ReadPrec ListTrafficPolicies
Int -> ReadS ListTrafficPolicies
ReadS [ListTrafficPolicies]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPolicies]
$creadListPrec :: ReadPrec [ListTrafficPolicies]
readPrec :: ReadPrec ListTrafficPolicies
$creadPrec :: ReadPrec ListTrafficPolicies
readList :: ReadS [ListTrafficPolicies]
$creadList :: ReadS [ListTrafficPolicies]
readsPrec :: Int -> ReadS ListTrafficPolicies
$creadsPrec :: Int -> ReadS ListTrafficPolicies
Prelude.Read, Int -> ListTrafficPolicies -> ShowS
[ListTrafficPolicies] -> ShowS
ListTrafficPolicies -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPolicies] -> ShowS
$cshowList :: [ListTrafficPolicies] -> ShowS
show :: ListTrafficPolicies -> String
$cshow :: ListTrafficPolicies -> String
showsPrec :: Int -> ListTrafficPolicies -> ShowS
$cshowsPrec :: Int -> ListTrafficPolicies -> ShowS
Prelude.Show, forall x. Rep ListTrafficPolicies x -> ListTrafficPolicies
forall x. ListTrafficPolicies -> Rep ListTrafficPolicies x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListTrafficPolicies x -> ListTrafficPolicies
$cfrom :: forall x. ListTrafficPolicies -> Rep ListTrafficPolicies x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPolicies' 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:
--
-- 'maxItems', 'listTrafficPolicies_maxItems' - (Optional) The maximum number of traffic policies that you want Amazon
-- Route 53 to return in response to this request. If you have more than
-- @MaxItems@ traffic policies, the value of @IsTruncated@ in the response
-- is @true@, and the value of @TrafficPolicyIdMarker@ is the ID of the
-- first traffic policy that Route 53 will return if you submit another
-- request.
--
-- 'trafficPolicyIdMarker', 'listTrafficPolicies_trafficPolicyIdMarker' - (Conditional) For your first request to @ListTrafficPolicies@, don\'t
-- include the @TrafficPolicyIdMarker@ parameter.
--
-- If you have more traffic policies than the value of @MaxItems@,
-- @ListTrafficPolicies@ returns only the first @MaxItems@ traffic
-- policies. To get the next group of policies, submit another request to
-- @ListTrafficPolicies@. For the value of @TrafficPolicyIdMarker@, specify
-- the value of @TrafficPolicyIdMarker@ that was returned in the previous
-- response.
newListTrafficPolicies ::
  ListTrafficPolicies
newListTrafficPolicies :: ListTrafficPolicies
newListTrafficPolicies =
  ListTrafficPolicies'
    { $sel:maxItems:ListTrafficPolicies' :: Maybe Text
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:trafficPolicyIdMarker:ListTrafficPolicies' :: Maybe Text
trafficPolicyIdMarker = forall a. Maybe a
Prelude.Nothing
    }

-- | (Optional) The maximum number of traffic policies that you want Amazon
-- Route 53 to return in response to this request. If you have more than
-- @MaxItems@ traffic policies, the value of @IsTruncated@ in the response
-- is @true@, and the value of @TrafficPolicyIdMarker@ is the ID of the
-- first traffic policy that Route 53 will return if you submit another
-- request.
listTrafficPolicies_maxItems :: Lens.Lens' ListTrafficPolicies (Prelude.Maybe Prelude.Text)
listTrafficPolicies_maxItems :: Lens' ListTrafficPolicies (Maybe Text)
listTrafficPolicies_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicies' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListTrafficPolicies
s@ListTrafficPolicies' {} Maybe Text
a -> ListTrafficPolicies
s {$sel:maxItems:ListTrafficPolicies' :: Maybe Text
maxItems = Maybe Text
a} :: ListTrafficPolicies)

-- | (Conditional) For your first request to @ListTrafficPolicies@, don\'t
-- include the @TrafficPolicyIdMarker@ parameter.
--
-- If you have more traffic policies than the value of @MaxItems@,
-- @ListTrafficPolicies@ returns only the first @MaxItems@ traffic
-- policies. To get the next group of policies, submit another request to
-- @ListTrafficPolicies@. For the value of @TrafficPolicyIdMarker@, specify
-- the value of @TrafficPolicyIdMarker@ that was returned in the previous
-- response.
listTrafficPolicies_trafficPolicyIdMarker :: Lens.Lens' ListTrafficPolicies (Prelude.Maybe Prelude.Text)
listTrafficPolicies_trafficPolicyIdMarker :: Lens' ListTrafficPolicies (Maybe Text)
listTrafficPolicies_trafficPolicyIdMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicies' {Maybe Text
trafficPolicyIdMarker :: Maybe Text
$sel:trafficPolicyIdMarker:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
trafficPolicyIdMarker} -> Maybe Text
trafficPolicyIdMarker) (\s :: ListTrafficPolicies
s@ListTrafficPolicies' {} Maybe Text
a -> ListTrafficPolicies
s {$sel:trafficPolicyIdMarker:ListTrafficPolicies' :: Maybe Text
trafficPolicyIdMarker = Maybe Text
a} :: ListTrafficPolicies)

instance Core.AWSRequest ListTrafficPolicies where
  type
    AWSResponse ListTrafficPolicies =
      ListTrafficPoliciesResponse
  request :: (Service -> Service)
-> ListTrafficPolicies -> Request ListTrafficPolicies
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListTrafficPolicies
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTrafficPolicies)))
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 ->
          Int
-> [TrafficPolicySummary]
-> Bool
-> Text
-> Text
-> ListTrafficPoliciesResponse
ListTrafficPoliciesResponse'
            forall (f :: * -> *) a b. Functor 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))
            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
"TrafficPolicySummaries"
                            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 a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"TrafficPolicySummary"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"TrafficPolicyIdMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"MaxItems")
      )

instance Prelude.Hashable ListTrafficPolicies where
  hashWithSalt :: Int -> ListTrafficPolicies -> Int
hashWithSalt Int
_salt ListTrafficPolicies' {Maybe Text
trafficPolicyIdMarker :: Maybe Text
maxItems :: Maybe Text
$sel:trafficPolicyIdMarker:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
$sel:maxItems:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trafficPolicyIdMarker

instance Prelude.NFData ListTrafficPolicies where
  rnf :: ListTrafficPolicies -> ()
rnf ListTrafficPolicies' {Maybe Text
trafficPolicyIdMarker :: Maybe Text
maxItems :: Maybe Text
$sel:trafficPolicyIdMarker:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
$sel:maxItems:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trafficPolicyIdMarker

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

instance Data.ToPath ListTrafficPolicies where
  toPath :: ListTrafficPolicies -> ByteString
toPath = forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/trafficpolicies"

instance Data.ToQuery ListTrafficPolicies where
  toQuery :: ListTrafficPolicies -> QueryString
toQuery ListTrafficPolicies' {Maybe Text
trafficPolicyIdMarker :: Maybe Text
maxItems :: Maybe Text
$sel:trafficPolicyIdMarker:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
$sel:maxItems:ListTrafficPolicies' :: ListTrafficPolicies -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxitems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
maxItems,
        ByteString
"trafficpolicyid" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
trafficPolicyIdMarker
      ]

-- | A complex type that contains the response information for the request.
--
-- /See:/ 'newListTrafficPoliciesResponse' smart constructor.
data ListTrafficPoliciesResponse = ListTrafficPoliciesResponse'
  { -- | The response's http status code.
    ListTrafficPoliciesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list that contains one @TrafficPolicySummary@ element for each traffic
    -- policy that was created by the current Amazon Web Services account.
    ListTrafficPoliciesResponse -> [TrafficPolicySummary]
trafficPolicySummaries :: [TrafficPolicySummary],
    -- | A flag that indicates whether there are more traffic policies to be
    -- listed. If the response was truncated, you can get the next group of
    -- traffic policies by submitting another @ListTrafficPolicies@ request and
    -- specifying the value of @TrafficPolicyIdMarker@ in the
    -- @TrafficPolicyIdMarker@ request parameter.
    ListTrafficPoliciesResponse -> Bool
isTruncated :: Prelude.Bool,
    -- | If the value of @IsTruncated@ is @true@, @TrafficPolicyIdMarker@ is the
    -- ID of the first traffic policy in the next group of @MaxItems@ traffic
    -- policies.
    ListTrafficPoliciesResponse -> Text
trafficPolicyIdMarker :: Prelude.Text,
    -- | The value that you specified for the @MaxItems@ parameter in the
    -- @ListTrafficPolicies@ request that produced the current response.
    ListTrafficPoliciesResponse -> Text
maxItems :: Prelude.Text
  }
  deriving (ListTrafficPoliciesResponse -> ListTrafficPoliciesResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPoliciesResponse -> ListTrafficPoliciesResponse -> Bool
$c/= :: ListTrafficPoliciesResponse -> ListTrafficPoliciesResponse -> Bool
== :: ListTrafficPoliciesResponse -> ListTrafficPoliciesResponse -> Bool
$c== :: ListTrafficPoliciesResponse -> ListTrafficPoliciesResponse -> Bool
Prelude.Eq, ReadPrec [ListTrafficPoliciesResponse]
ReadPrec ListTrafficPoliciesResponse
Int -> ReadS ListTrafficPoliciesResponse
ReadS [ListTrafficPoliciesResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPoliciesResponse]
$creadListPrec :: ReadPrec [ListTrafficPoliciesResponse]
readPrec :: ReadPrec ListTrafficPoliciesResponse
$creadPrec :: ReadPrec ListTrafficPoliciesResponse
readList :: ReadS [ListTrafficPoliciesResponse]
$creadList :: ReadS [ListTrafficPoliciesResponse]
readsPrec :: Int -> ReadS ListTrafficPoliciesResponse
$creadsPrec :: Int -> ReadS ListTrafficPoliciesResponse
Prelude.Read, Int -> ListTrafficPoliciesResponse -> ShowS
[ListTrafficPoliciesResponse] -> ShowS
ListTrafficPoliciesResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPoliciesResponse] -> ShowS
$cshowList :: [ListTrafficPoliciesResponse] -> ShowS
show :: ListTrafficPoliciesResponse -> String
$cshow :: ListTrafficPoliciesResponse -> String
showsPrec :: Int -> ListTrafficPoliciesResponse -> ShowS
$cshowsPrec :: Int -> ListTrafficPoliciesResponse -> ShowS
Prelude.Show, forall x.
Rep ListTrafficPoliciesResponse x -> ListTrafficPoliciesResponse
forall x.
ListTrafficPoliciesResponse -> Rep ListTrafficPoliciesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrafficPoliciesResponse x -> ListTrafficPoliciesResponse
$cfrom :: forall x.
ListTrafficPoliciesResponse -> Rep ListTrafficPoliciesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPoliciesResponse' 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:
--
-- 'httpStatus', 'listTrafficPoliciesResponse_httpStatus' - The response's http status code.
--
-- 'trafficPolicySummaries', 'listTrafficPoliciesResponse_trafficPolicySummaries' - A list that contains one @TrafficPolicySummary@ element for each traffic
-- policy that was created by the current Amazon Web Services account.
--
-- 'isTruncated', 'listTrafficPoliciesResponse_isTruncated' - A flag that indicates whether there are more traffic policies to be
-- listed. If the response was truncated, you can get the next group of
-- traffic policies by submitting another @ListTrafficPolicies@ request and
-- specifying the value of @TrafficPolicyIdMarker@ in the
-- @TrafficPolicyIdMarker@ request parameter.
--
-- 'trafficPolicyIdMarker', 'listTrafficPoliciesResponse_trafficPolicyIdMarker' - If the value of @IsTruncated@ is @true@, @TrafficPolicyIdMarker@ is the
-- ID of the first traffic policy in the next group of @MaxItems@ traffic
-- policies.
--
-- 'maxItems', 'listTrafficPoliciesResponse_maxItems' - The value that you specified for the @MaxItems@ parameter in the
-- @ListTrafficPolicies@ request that produced the current response.
newListTrafficPoliciesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'isTruncated'
  Prelude.Bool ->
  -- | 'trafficPolicyIdMarker'
  Prelude.Text ->
  -- | 'maxItems'
  Prelude.Text ->
  ListTrafficPoliciesResponse
newListTrafficPoliciesResponse :: Int -> Bool -> Text -> Text -> ListTrafficPoliciesResponse
newListTrafficPoliciesResponse
  Int
pHttpStatus_
  Bool
pIsTruncated_
  Text
pTrafficPolicyIdMarker_
  Text
pMaxItems_ =
    ListTrafficPoliciesResponse'
      { $sel:httpStatus:ListTrafficPoliciesResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:trafficPolicySummaries:ListTrafficPoliciesResponse' :: [TrafficPolicySummary]
trafficPolicySummaries = forall a. Monoid a => a
Prelude.mempty,
        $sel:isTruncated:ListTrafficPoliciesResponse' :: Bool
isTruncated = Bool
pIsTruncated_,
        $sel:trafficPolicyIdMarker:ListTrafficPoliciesResponse' :: Text
trafficPolicyIdMarker =
          Text
pTrafficPolicyIdMarker_,
        $sel:maxItems:ListTrafficPoliciesResponse' :: Text
maxItems = Text
pMaxItems_
      }

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

-- | A list that contains one @TrafficPolicySummary@ element for each traffic
-- policy that was created by the current Amazon Web Services account.
listTrafficPoliciesResponse_trafficPolicySummaries :: Lens.Lens' ListTrafficPoliciesResponse [TrafficPolicySummary]
listTrafficPoliciesResponse_trafficPolicySummaries :: Lens' ListTrafficPoliciesResponse [TrafficPolicySummary]
listTrafficPoliciesResponse_trafficPolicySummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPoliciesResponse' {[TrafficPolicySummary]
trafficPolicySummaries :: [TrafficPolicySummary]
$sel:trafficPolicySummaries:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> [TrafficPolicySummary]
trafficPolicySummaries} -> [TrafficPolicySummary]
trafficPolicySummaries) (\s :: ListTrafficPoliciesResponse
s@ListTrafficPoliciesResponse' {} [TrafficPolicySummary]
a -> ListTrafficPoliciesResponse
s {$sel:trafficPolicySummaries:ListTrafficPoliciesResponse' :: [TrafficPolicySummary]
trafficPolicySummaries = [TrafficPolicySummary]
a} :: ListTrafficPoliciesResponse) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A flag that indicates whether there are more traffic policies to be
-- listed. If the response was truncated, you can get the next group of
-- traffic policies by submitting another @ListTrafficPolicies@ request and
-- specifying the value of @TrafficPolicyIdMarker@ in the
-- @TrafficPolicyIdMarker@ request parameter.
listTrafficPoliciesResponse_isTruncated :: Lens.Lens' ListTrafficPoliciesResponse Prelude.Bool
listTrafficPoliciesResponse_isTruncated :: Lens' ListTrafficPoliciesResponse Bool
listTrafficPoliciesResponse_isTruncated = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPoliciesResponse' {Bool
isTruncated :: Bool
$sel:isTruncated:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Bool
isTruncated} -> Bool
isTruncated) (\s :: ListTrafficPoliciesResponse
s@ListTrafficPoliciesResponse' {} Bool
a -> ListTrafficPoliciesResponse
s {$sel:isTruncated:ListTrafficPoliciesResponse' :: Bool
isTruncated = Bool
a} :: ListTrafficPoliciesResponse)

-- | If the value of @IsTruncated@ is @true@, @TrafficPolicyIdMarker@ is the
-- ID of the first traffic policy in the next group of @MaxItems@ traffic
-- policies.
listTrafficPoliciesResponse_trafficPolicyIdMarker :: Lens.Lens' ListTrafficPoliciesResponse Prelude.Text
listTrafficPoliciesResponse_trafficPolicyIdMarker :: Lens' ListTrafficPoliciesResponse Text
listTrafficPoliciesResponse_trafficPolicyIdMarker = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPoliciesResponse' {Text
trafficPolicyIdMarker :: Text
$sel:trafficPolicyIdMarker:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Text
trafficPolicyIdMarker} -> Text
trafficPolicyIdMarker) (\s :: ListTrafficPoliciesResponse
s@ListTrafficPoliciesResponse' {} Text
a -> ListTrafficPoliciesResponse
s {$sel:trafficPolicyIdMarker:ListTrafficPoliciesResponse' :: Text
trafficPolicyIdMarker = Text
a} :: ListTrafficPoliciesResponse)

-- | The value that you specified for the @MaxItems@ parameter in the
-- @ListTrafficPolicies@ request that produced the current response.
listTrafficPoliciesResponse_maxItems :: Lens.Lens' ListTrafficPoliciesResponse Prelude.Text
listTrafficPoliciesResponse_maxItems :: Lens' ListTrafficPoliciesResponse Text
listTrafficPoliciesResponse_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPoliciesResponse' {Text
maxItems :: Text
$sel:maxItems:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Text
maxItems} -> Text
maxItems) (\s :: ListTrafficPoliciesResponse
s@ListTrafficPoliciesResponse' {} Text
a -> ListTrafficPoliciesResponse
s {$sel:maxItems:ListTrafficPoliciesResponse' :: Text
maxItems = Text
a} :: ListTrafficPoliciesResponse)

instance Prelude.NFData ListTrafficPoliciesResponse where
  rnf :: ListTrafficPoliciesResponse -> ()
rnf ListTrafficPoliciesResponse' {Bool
Int
[TrafficPolicySummary]
Text
maxItems :: Text
trafficPolicyIdMarker :: Text
isTruncated :: Bool
trafficPolicySummaries :: [TrafficPolicySummary]
httpStatus :: Int
$sel:maxItems:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Text
$sel:trafficPolicyIdMarker:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Text
$sel:isTruncated:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Bool
$sel:trafficPolicySummaries:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> [TrafficPolicySummary]
$sel:httpStatus:ListTrafficPoliciesResponse' :: ListTrafficPoliciesResponse -> Int
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [TrafficPolicySummary]
trafficPolicySummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trafficPolicyIdMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
maxItems