{-# 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.ListTrafficPolicyInstances
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about the traffic policy instances that you created by
-- using the current Amazon Web Services account.
--
-- After you submit an @UpdateTrafficPolicyInstance@ request, there\'s a
-- brief delay while Amazon Route 53 creates the resource record sets that
-- are specified in the traffic policy definition. For more information,
-- see the @State@ response element.
--
-- Route 53 returns a maximum of 100 items in each response. If you have a
-- lot of traffic policy instances, you can use the @MaxItems@ parameter to
-- list them in groups of up to 100.
module Amazonka.Route53.ListTrafficPolicyInstances
  ( -- * Creating a Request
    ListTrafficPolicyInstances (..),
    newListTrafficPolicyInstances,

    -- * Request Lenses
    listTrafficPolicyInstances_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstances_maxItems,
    listTrafficPolicyInstances_hostedZoneIdMarker,
    listTrafficPolicyInstances_trafficPolicyInstanceNameMarker,

    -- * Destructuring the Response
    ListTrafficPolicyInstancesResponse (..),
    newListTrafficPolicyInstancesResponse,

    -- * Response Lenses
    listTrafficPolicyInstancesResponse_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstancesResponse_hostedZoneIdMarker,
    listTrafficPolicyInstancesResponse_trafficPolicyInstanceNameMarker,
    listTrafficPolicyInstancesResponse_httpStatus,
    listTrafficPolicyInstancesResponse_trafficPolicyInstances,
    listTrafficPolicyInstancesResponse_isTruncated,
    listTrafficPolicyInstancesResponse_maxItems,
  )
where

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

-- | A request to get information about the traffic policy instances that you
-- created by using the current Amazon Web Services account.
--
-- /See:/ 'newListTrafficPolicyInstances' smart constructor.
data ListTrafficPolicyInstances = ListTrafficPolicyInstances'
  { -- | If the value of @IsTruncated@ in the previous response was @true@, you
    -- have more traffic policy instances. To get more traffic policy
    -- instances, submit another @ListTrafficPolicyInstances@ request. For the
    -- value of @trafficpolicyinstancetype@, specify the value of
    -- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
    -- the type of the first traffic policy instance in the next group of
    -- traffic policy instances.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstances -> Maybe RRType
trafficPolicyInstanceTypeMarker :: Prelude.Maybe RRType,
    -- | The maximum number of traffic policy instances that you want Amazon
    -- Route 53 to return in response to a @ListTrafficPolicyInstances@
    -- request. If you have more than @MaxItems@ traffic policy instances, the
    -- value of the @IsTruncated@ element in the response is @true@, and the
    -- values of @HostedZoneIdMarker@, @TrafficPolicyInstanceNameMarker@, and
    -- @TrafficPolicyInstanceTypeMarker@ represent the first traffic policy
    -- instance in the next group of @MaxItems@ traffic policy instances.
    ListTrafficPolicyInstances -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | If the value of @IsTruncated@ in the previous response was @true@, you
    -- have more traffic policy instances. To get more traffic policy
    -- instances, submit another @ListTrafficPolicyInstances@ request. For the
    -- value of @HostedZoneId@, specify the value of @HostedZoneIdMarker@ from
    -- the previous response, which is the hosted zone ID of the first traffic
    -- policy instance in the next group of traffic policy instances.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstances -> Maybe ResourceId
hostedZoneIdMarker :: Prelude.Maybe ResourceId,
    -- | If the value of @IsTruncated@ in the previous response was @true@, you
    -- have more traffic policy instances. To get more traffic policy
    -- instances, submit another @ListTrafficPolicyInstances@ request. For the
    -- value of @trafficpolicyinstancename@, specify the value of
    -- @TrafficPolicyInstanceNameMarker@ from the previous response, which is
    -- the name of the first traffic policy instance in the next group of
    -- traffic policy instances.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstances -> Maybe Text
trafficPolicyInstanceNameMarker :: Prelude.Maybe Prelude.Text
  }
  deriving (ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool
(ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool)
-> (ListTrafficPolicyInstances
    -> ListTrafficPolicyInstances -> Bool)
-> Eq ListTrafficPolicyInstances
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool
$c/= :: ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool
== :: ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool
$c== :: ListTrafficPolicyInstances -> ListTrafficPolicyInstances -> Bool
Prelude.Eq, ReadPrec [ListTrafficPolicyInstances]
ReadPrec ListTrafficPolicyInstances
Int -> ReadS ListTrafficPolicyInstances
ReadS [ListTrafficPolicyInstances]
(Int -> ReadS ListTrafficPolicyInstances)
-> ReadS [ListTrafficPolicyInstances]
-> ReadPrec ListTrafficPolicyInstances
-> ReadPrec [ListTrafficPolicyInstances]
-> Read ListTrafficPolicyInstances
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPolicyInstances]
$creadListPrec :: ReadPrec [ListTrafficPolicyInstances]
readPrec :: ReadPrec ListTrafficPolicyInstances
$creadPrec :: ReadPrec ListTrafficPolicyInstances
readList :: ReadS [ListTrafficPolicyInstances]
$creadList :: ReadS [ListTrafficPolicyInstances]
readsPrec :: Int -> ReadS ListTrafficPolicyInstances
$creadsPrec :: Int -> ReadS ListTrafficPolicyInstances
Prelude.Read, Int -> ListTrafficPolicyInstances -> ShowS
[ListTrafficPolicyInstances] -> ShowS
ListTrafficPolicyInstances -> String
(Int -> ListTrafficPolicyInstances -> ShowS)
-> (ListTrafficPolicyInstances -> String)
-> ([ListTrafficPolicyInstances] -> ShowS)
-> Show ListTrafficPolicyInstances
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPolicyInstances] -> ShowS
$cshowList :: [ListTrafficPolicyInstances] -> ShowS
show :: ListTrafficPolicyInstances -> String
$cshow :: ListTrafficPolicyInstances -> String
showsPrec :: Int -> ListTrafficPolicyInstances -> ShowS
$cshowsPrec :: Int -> ListTrafficPolicyInstances -> ShowS
Prelude.Show, (forall x.
 ListTrafficPolicyInstances -> Rep ListTrafficPolicyInstances x)
-> (forall x.
    Rep ListTrafficPolicyInstances x -> ListTrafficPolicyInstances)
-> Generic ListTrafficPolicyInstances
forall x.
Rep ListTrafficPolicyInstances x -> ListTrafficPolicyInstances
forall x.
ListTrafficPolicyInstances -> Rep ListTrafficPolicyInstances x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrafficPolicyInstances x -> ListTrafficPolicyInstances
$cfrom :: forall x.
ListTrafficPolicyInstances -> Rep ListTrafficPolicyInstances x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPolicyInstances' 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:
--
-- 'trafficPolicyInstanceTypeMarker', 'listTrafficPolicyInstances_trafficPolicyInstanceTypeMarker' - If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @trafficpolicyinstancetype@, specify the value of
-- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
-- the type of the first traffic policy instance in the next group of
-- traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
--
-- 'maxItems', 'listTrafficPolicyInstances_maxItems' - The maximum number of traffic policy instances that you want Amazon
-- Route 53 to return in response to a @ListTrafficPolicyInstances@
-- request. If you have more than @MaxItems@ traffic policy instances, the
-- value of the @IsTruncated@ element in the response is @true@, and the
-- values of @HostedZoneIdMarker@, @TrafficPolicyInstanceNameMarker@, and
-- @TrafficPolicyInstanceTypeMarker@ represent the first traffic policy
-- instance in the next group of @MaxItems@ traffic policy instances.
--
-- 'hostedZoneIdMarker', 'listTrafficPolicyInstances_hostedZoneIdMarker' - If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @HostedZoneId@, specify the value of @HostedZoneIdMarker@ from
-- the previous response, which is the hosted zone ID of the first traffic
-- policy instance in the next group of traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
--
-- 'trafficPolicyInstanceNameMarker', 'listTrafficPolicyInstances_trafficPolicyInstanceNameMarker' - If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @trafficpolicyinstancename@, specify the value of
-- @TrafficPolicyInstanceNameMarker@ from the previous response, which is
-- the name of the first traffic policy instance in the next group of
-- traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
newListTrafficPolicyInstances ::
  ListTrafficPolicyInstances
newListTrafficPolicyInstances :: ListTrafficPolicyInstances
newListTrafficPolicyInstances =
  ListTrafficPolicyInstances' :: Maybe RRType
-> Maybe Text
-> Maybe ResourceId
-> Maybe Text
-> ListTrafficPolicyInstances
ListTrafficPolicyInstances'
    { $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstances' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
        Maybe RRType
forall a. Maybe a
Prelude.Nothing,
      $sel:maxItems:ListTrafficPolicyInstances' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hostedZoneIdMarker:ListTrafficPolicyInstances' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
forall a. Maybe a
Prelude.Nothing,
      $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstances' :: Maybe Text
trafficPolicyInstanceNameMarker =
        Maybe Text
forall a. Maybe a
Prelude.Nothing
    }

-- | If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @trafficpolicyinstancetype@, specify the value of
-- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
-- the type of the first traffic policy instance in the next group of
-- traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstances_trafficPolicyInstanceTypeMarker :: Lens.Lens' ListTrafficPolicyInstances (Prelude.Maybe RRType)
listTrafficPolicyInstances_trafficPolicyInstanceTypeMarker :: (Maybe RRType -> f (Maybe RRType))
-> ListTrafficPolicyInstances -> f ListTrafficPolicyInstances
listTrafficPolicyInstances_trafficPolicyInstanceTypeMarker = (ListTrafficPolicyInstances -> Maybe RRType)
-> (ListTrafficPolicyInstances
    -> Maybe RRType -> ListTrafficPolicyInstances)
-> Lens
     ListTrafficPolicyInstances
     ListTrafficPolicyInstances
     (Maybe RRType)
     (Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstances' {Maybe RRType
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe RRType
trafficPolicyInstanceTypeMarker} -> Maybe RRType
trafficPolicyInstanceTypeMarker) (\s :: ListTrafficPolicyInstances
s@ListTrafficPolicyInstances' {} Maybe RRType
a -> ListTrafficPolicyInstances
s {$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstances' :: Maybe RRType
trafficPolicyInstanceTypeMarker = Maybe RRType
a} :: ListTrafficPolicyInstances)

-- | The maximum number of traffic policy instances that you want Amazon
-- Route 53 to return in response to a @ListTrafficPolicyInstances@
-- request. If you have more than @MaxItems@ traffic policy instances, the
-- value of the @IsTruncated@ element in the response is @true@, and the
-- values of @HostedZoneIdMarker@, @TrafficPolicyInstanceNameMarker@, and
-- @TrafficPolicyInstanceTypeMarker@ represent the first traffic policy
-- instance in the next group of @MaxItems@ traffic policy instances.
listTrafficPolicyInstances_maxItems :: Lens.Lens' ListTrafficPolicyInstances (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstances_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstances -> f ListTrafficPolicyInstances
listTrafficPolicyInstances_maxItems = (ListTrafficPolicyInstances -> Maybe Text)
-> (ListTrafficPolicyInstances
    -> Maybe Text -> ListTrafficPolicyInstances)
-> Lens
     ListTrafficPolicyInstances
     ListTrafficPolicyInstances
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstances' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListTrafficPolicyInstances
s@ListTrafficPolicyInstances' {} Maybe Text
a -> ListTrafficPolicyInstances
s {$sel:maxItems:ListTrafficPolicyInstances' :: Maybe Text
maxItems = Maybe Text
a} :: ListTrafficPolicyInstances)

-- | If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @HostedZoneId@, specify the value of @HostedZoneIdMarker@ from
-- the previous response, which is the hosted zone ID of the first traffic
-- policy instance in the next group of traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstances_hostedZoneIdMarker :: Lens.Lens' ListTrafficPolicyInstances (Prelude.Maybe ResourceId)
listTrafficPolicyInstances_hostedZoneIdMarker :: (Maybe ResourceId -> f (Maybe ResourceId))
-> ListTrafficPolicyInstances -> f ListTrafficPolicyInstances
listTrafficPolicyInstances_hostedZoneIdMarker = (ListTrafficPolicyInstances -> Maybe ResourceId)
-> (ListTrafficPolicyInstances
    -> Maybe ResourceId -> ListTrafficPolicyInstances)
-> Lens
     ListTrafficPolicyInstances
     ListTrafficPolicyInstances
     (Maybe ResourceId)
     (Maybe ResourceId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstances' {Maybe ResourceId
hostedZoneIdMarker :: Maybe ResourceId
$sel:hostedZoneIdMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe ResourceId
hostedZoneIdMarker} -> Maybe ResourceId
hostedZoneIdMarker) (\s :: ListTrafficPolicyInstances
s@ListTrafficPolicyInstances' {} Maybe ResourceId
a -> ListTrafficPolicyInstances
s {$sel:hostedZoneIdMarker:ListTrafficPolicyInstances' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
a} :: ListTrafficPolicyInstances)

-- | If the value of @IsTruncated@ in the previous response was @true@, you
-- have more traffic policy instances. To get more traffic policy
-- instances, submit another @ListTrafficPolicyInstances@ request. For the
-- value of @trafficpolicyinstancename@, specify the value of
-- @TrafficPolicyInstanceNameMarker@ from the previous response, which is
-- the name of the first traffic policy instance in the next group of
-- traffic policy instances.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstances_trafficPolicyInstanceNameMarker :: Lens.Lens' ListTrafficPolicyInstances (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstances_trafficPolicyInstanceNameMarker :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstances -> f ListTrafficPolicyInstances
listTrafficPolicyInstances_trafficPolicyInstanceNameMarker = (ListTrafficPolicyInstances -> Maybe Text)
-> (ListTrafficPolicyInstances
    -> Maybe Text -> ListTrafficPolicyInstances)
-> Lens
     ListTrafficPolicyInstances
     ListTrafficPolicyInstances
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstances' {Maybe Text
trafficPolicyInstanceNameMarker :: Maybe Text
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe Text
trafficPolicyInstanceNameMarker} -> Maybe Text
trafficPolicyInstanceNameMarker) (\s :: ListTrafficPolicyInstances
s@ListTrafficPolicyInstances' {} Maybe Text
a -> ListTrafficPolicyInstances
s {$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstances' :: Maybe Text
trafficPolicyInstanceNameMarker = Maybe Text
a} :: ListTrafficPolicyInstances)

instance Core.AWSRequest ListTrafficPolicyInstances where
  type
    AWSResponse ListTrafficPolicyInstances =
      ListTrafficPolicyInstancesResponse
  request :: ListTrafficPolicyInstances -> Request ListTrafficPolicyInstances
request = Service
-> ListTrafficPolicyInstances -> Request ListTrafficPolicyInstances
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListTrafficPolicyInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTrafficPolicyInstances)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListTrafficPolicyInstances))
-> Logger
-> Service
-> Proxy ListTrafficPolicyInstances
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListTrafficPolicyInstances)))
forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe RRType
-> Maybe ResourceId
-> Maybe Text
-> Int
-> [TrafficPolicyInstance]
-> Bool
-> Text
-> ListTrafficPolicyInstancesResponse
ListTrafficPolicyInstancesResponse'
            (Maybe RRType
 -> Maybe ResourceId
 -> Maybe Text
 -> Int
 -> [TrafficPolicyInstance]
 -> Bool
 -> Text
 -> ListTrafficPolicyInstancesResponse)
-> Either String (Maybe RRType)
-> Either
     String
     (Maybe ResourceId
      -> Maybe Text
      -> Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x [Node] -> Text -> Either String (Maybe RRType)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TrafficPolicyInstanceTypeMarker")
            Either
  String
  (Maybe ResourceId
   -> Maybe Text
   -> Int
   -> [TrafficPolicyInstance]
   -> Bool
   -> Text
   -> ListTrafficPolicyInstancesResponse)
-> Either String (Maybe ResourceId)
-> Either
     String
     (Maybe Text
      -> Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe ResourceId)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"HostedZoneIdMarker")
            Either
  String
  (Maybe Text
   -> Int
   -> [TrafficPolicyInstance]
   -> Bool
   -> Text
   -> ListTrafficPolicyInstancesResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String (Maybe Text)
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TrafficPolicyInstanceNameMarker")
            Either
  String
  (Int
   -> [TrafficPolicyInstance]
   -> Bool
   -> Text
   -> ListTrafficPolicyInstancesResponse)
-> Either String Int
-> Either
     String
     ([TrafficPolicyInstance]
      -> Bool -> Text -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Int -> Either String Int
forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (Int -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            Either
  String
  ([TrafficPolicyInstance]
   -> Bool -> Text -> ListTrafficPolicyInstancesResponse)
-> Either String [TrafficPolicyInstance]
-> Either
     String (Bool -> Text -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x [Node] -> Text -> Either String (Maybe [Node])
forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Core..@? Text
"TrafficPolicyInstances"
                            Either String (Maybe [Node]) -> [Node] -> Either String [Node]
forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ [Node]
forall a. Monoid a => a
Prelude.mempty
                            Either String [Node]
-> ([Node] -> Either String [TrafficPolicyInstance])
-> Either String [TrafficPolicyInstance]
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= Text -> [Node] -> Either String [TrafficPolicyInstance]
forall a. FromXML a => Text -> [Node] -> Either String [a]
Core.parseXMLList Text
"TrafficPolicyInstance"
                        )
            Either String (Bool -> Text -> ListTrafficPolicyInstancesResponse)
-> Either String Bool
-> Either String (Text -> ListTrafficPolicyInstancesResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Bool
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"IsTruncated")
            Either String (Text -> ListTrafficPolicyInstancesResponse)
-> Either String Text
-> Either String ListTrafficPolicyInstancesResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String Text
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"MaxItems")
      )

instance Prelude.Hashable ListTrafficPolicyInstances

instance Prelude.NFData ListTrafficPolicyInstances

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

instance Core.ToPath ListTrafficPolicyInstances where
  toPath :: ListTrafficPolicyInstances -> ByteString
toPath =
    ByteString -> ListTrafficPolicyInstances -> ByteString
forall a b. a -> b -> a
Prelude.const ByteString
"/2013-04-01/trafficpolicyinstances"

instance Core.ToQuery ListTrafficPolicyInstances where
  toQuery :: ListTrafficPolicyInstances -> QueryString
toQuery ListTrafficPolicyInstances' {Maybe Text
Maybe ResourceId
Maybe RRType
trafficPolicyInstanceNameMarker :: Maybe Text
hostedZoneIdMarker :: Maybe ResourceId
maxItems :: Maybe Text
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe Text
$sel:hostedZoneIdMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe ResourceId
$sel:maxItems:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe Text
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstances' :: ListTrafficPolicyInstances -> Maybe RRType
..} =
    [QueryString] -> QueryString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"trafficpolicyinstancetype"
          ByteString -> Maybe RRType -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe RRType
trafficPolicyInstanceTypeMarker,
        ByteString
"maxitems" ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
maxItems,
        ByteString
"hostedzoneid" ByteString -> Maybe ResourceId -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe ResourceId
hostedZoneIdMarker,
        ByteString
"trafficpolicyinstancename"
          ByteString -> Maybe Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Maybe Text
trafficPolicyInstanceNameMarker
      ]

-- | A complex type that contains the response information for the request.
--
-- /See:/ 'newListTrafficPolicyInstancesResponse' smart constructor.
data ListTrafficPolicyInstancesResponse = ListTrafficPolicyInstancesResponse'
  { -- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceTypeMarker@ is the DNS
    -- type of the resource record sets that are associated with the first
    -- traffic policy instance that Amazon Route 53 will return if you submit
    -- another @ListTrafficPolicyInstances@ request.
    ListTrafficPolicyInstancesResponse -> Maybe RRType
trafficPolicyInstanceTypeMarker :: Prelude.Maybe RRType,
    -- | If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
    -- zone of the first traffic policy instance that Route 53 will return if
    -- you submit another @ListTrafficPolicyInstances@ request.
    ListTrafficPolicyInstancesResponse -> Maybe ResourceId
hostedZoneIdMarker :: Prelude.Maybe ResourceId,
    -- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
    -- name of the first traffic policy instance that Route 53 will return if
    -- you submit another @ListTrafficPolicyInstances@ request.
    ListTrafficPolicyInstancesResponse -> Maybe Text
trafficPolicyInstanceNameMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTrafficPolicyInstancesResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list that contains one @TrafficPolicyInstance@ element for each
    -- traffic policy instance that matches the elements in the request.
    ListTrafficPolicyInstancesResponse -> [TrafficPolicyInstance]
trafficPolicyInstances :: [TrafficPolicyInstance],
    -- | A flag that indicates whether there are more traffic policy instances to
    -- be listed. If the response was truncated, you can get more traffic
    -- policy instances by calling @ListTrafficPolicyInstances@ again and
    -- specifying the values of the @HostedZoneIdMarker@,
    -- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
    -- in the corresponding request parameters.
    ListTrafficPolicyInstancesResponse -> Bool
isTruncated :: Prelude.Bool,
    -- | The value that you specified for the @MaxItems@ parameter in the call to
    -- @ListTrafficPolicyInstances@ that produced the current response.
    ListTrafficPolicyInstancesResponse -> Text
maxItems :: Prelude.Text
  }
  deriving (ListTrafficPolicyInstancesResponse
-> ListTrafficPolicyInstancesResponse -> Bool
(ListTrafficPolicyInstancesResponse
 -> ListTrafficPolicyInstancesResponse -> Bool)
-> (ListTrafficPolicyInstancesResponse
    -> ListTrafficPolicyInstancesResponse -> Bool)
-> Eq ListTrafficPolicyInstancesResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPolicyInstancesResponse
-> ListTrafficPolicyInstancesResponse -> Bool
$c/= :: ListTrafficPolicyInstancesResponse
-> ListTrafficPolicyInstancesResponse -> Bool
== :: ListTrafficPolicyInstancesResponse
-> ListTrafficPolicyInstancesResponse -> Bool
$c== :: ListTrafficPolicyInstancesResponse
-> ListTrafficPolicyInstancesResponse -> Bool
Prelude.Eq, ReadPrec [ListTrafficPolicyInstancesResponse]
ReadPrec ListTrafficPolicyInstancesResponse
Int -> ReadS ListTrafficPolicyInstancesResponse
ReadS [ListTrafficPolicyInstancesResponse]
(Int -> ReadS ListTrafficPolicyInstancesResponse)
-> ReadS [ListTrafficPolicyInstancesResponse]
-> ReadPrec ListTrafficPolicyInstancesResponse
-> ReadPrec [ListTrafficPolicyInstancesResponse]
-> Read ListTrafficPolicyInstancesResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPolicyInstancesResponse]
$creadListPrec :: ReadPrec [ListTrafficPolicyInstancesResponse]
readPrec :: ReadPrec ListTrafficPolicyInstancesResponse
$creadPrec :: ReadPrec ListTrafficPolicyInstancesResponse
readList :: ReadS [ListTrafficPolicyInstancesResponse]
$creadList :: ReadS [ListTrafficPolicyInstancesResponse]
readsPrec :: Int -> ReadS ListTrafficPolicyInstancesResponse
$creadsPrec :: Int -> ReadS ListTrafficPolicyInstancesResponse
Prelude.Read, Int -> ListTrafficPolicyInstancesResponse -> ShowS
[ListTrafficPolicyInstancesResponse] -> ShowS
ListTrafficPolicyInstancesResponse -> String
(Int -> ListTrafficPolicyInstancesResponse -> ShowS)
-> (ListTrafficPolicyInstancesResponse -> String)
-> ([ListTrafficPolicyInstancesResponse] -> ShowS)
-> Show ListTrafficPolicyInstancesResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPolicyInstancesResponse] -> ShowS
$cshowList :: [ListTrafficPolicyInstancesResponse] -> ShowS
show :: ListTrafficPolicyInstancesResponse -> String
$cshow :: ListTrafficPolicyInstancesResponse -> String
showsPrec :: Int -> ListTrafficPolicyInstancesResponse -> ShowS
$cshowsPrec :: Int -> ListTrafficPolicyInstancesResponse -> ShowS
Prelude.Show, (forall x.
 ListTrafficPolicyInstancesResponse
 -> Rep ListTrafficPolicyInstancesResponse x)
-> (forall x.
    Rep ListTrafficPolicyInstancesResponse x
    -> ListTrafficPolicyInstancesResponse)
-> Generic ListTrafficPolicyInstancesResponse
forall x.
Rep ListTrafficPolicyInstancesResponse x
-> ListTrafficPolicyInstancesResponse
forall x.
ListTrafficPolicyInstancesResponse
-> Rep ListTrafficPolicyInstancesResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrafficPolicyInstancesResponse x
-> ListTrafficPolicyInstancesResponse
$cfrom :: forall x.
ListTrafficPolicyInstancesResponse
-> Rep ListTrafficPolicyInstancesResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPolicyInstancesResponse' 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:
--
-- 'trafficPolicyInstanceTypeMarker', 'listTrafficPolicyInstancesResponse_trafficPolicyInstanceTypeMarker' - If @IsTruncated@ is @true@, @TrafficPolicyInstanceTypeMarker@ is the DNS
-- type of the resource record sets that are associated with the first
-- traffic policy instance that Amazon Route 53 will return if you submit
-- another @ListTrafficPolicyInstances@ request.
--
-- 'hostedZoneIdMarker', 'listTrafficPolicyInstancesResponse_hostedZoneIdMarker' - If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
-- zone of the first traffic policy instance that Route 53 will return if
-- you submit another @ListTrafficPolicyInstances@ request.
--
-- 'trafficPolicyInstanceNameMarker', 'listTrafficPolicyInstancesResponse_trafficPolicyInstanceNameMarker' - If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
-- name of the first traffic policy instance that Route 53 will return if
-- you submit another @ListTrafficPolicyInstances@ request.
--
-- 'httpStatus', 'listTrafficPolicyInstancesResponse_httpStatus' - The response's http status code.
--
-- 'trafficPolicyInstances', 'listTrafficPolicyInstancesResponse_trafficPolicyInstances' - A list that contains one @TrafficPolicyInstance@ element for each
-- traffic policy instance that matches the elements in the request.
--
-- 'isTruncated', 'listTrafficPolicyInstancesResponse_isTruncated' - A flag that indicates whether there are more traffic policy instances to
-- be listed. If the response was truncated, you can get more traffic
-- policy instances by calling @ListTrafficPolicyInstances@ again and
-- specifying the values of the @HostedZoneIdMarker@,
-- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
-- in the corresponding request parameters.
--
-- 'maxItems', 'listTrafficPolicyInstancesResponse_maxItems' - The value that you specified for the @MaxItems@ parameter in the call to
-- @ListTrafficPolicyInstances@ that produced the current response.
newListTrafficPolicyInstancesResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'isTruncated'
  Prelude.Bool ->
  -- | 'maxItems'
  Prelude.Text ->
  ListTrafficPolicyInstancesResponse
newListTrafficPolicyInstancesResponse :: Int -> Bool -> Text -> ListTrafficPolicyInstancesResponse
newListTrafficPolicyInstancesResponse
  Int
pHttpStatus_
  Bool
pIsTruncated_
  Text
pMaxItems_ =
    ListTrafficPolicyInstancesResponse' :: Maybe RRType
-> Maybe ResourceId
-> Maybe Text
-> Int
-> [TrafficPolicyInstance]
-> Bool
-> Text
-> ListTrafficPolicyInstancesResponse
ListTrafficPolicyInstancesResponse'
      { $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesResponse' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
          Maybe RRType
forall a. Maybe a
Prelude.Nothing,
        $sel:hostedZoneIdMarker:ListTrafficPolicyInstancesResponse' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesResponse' :: Maybe Text
trafficPolicyInstanceNameMarker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListTrafficPolicyInstancesResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:trafficPolicyInstances:ListTrafficPolicyInstancesResponse' :: [TrafficPolicyInstance]
trafficPolicyInstances = [TrafficPolicyInstance]
forall a. Monoid a => a
Prelude.mempty,
        $sel:isTruncated:ListTrafficPolicyInstancesResponse' :: Bool
isTruncated = Bool
pIsTruncated_,
        $sel:maxItems:ListTrafficPolicyInstancesResponse' :: Text
maxItems = Text
pMaxItems_
      }

-- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceTypeMarker@ is the DNS
-- type of the resource record sets that are associated with the first
-- traffic policy instance that Amazon Route 53 will return if you submit
-- another @ListTrafficPolicyInstances@ request.
listTrafficPolicyInstancesResponse_trafficPolicyInstanceTypeMarker :: Lens.Lens' ListTrafficPolicyInstancesResponse (Prelude.Maybe RRType)
listTrafficPolicyInstancesResponse_trafficPolicyInstanceTypeMarker :: (Maybe RRType -> f (Maybe RRType))
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_trafficPolicyInstanceTypeMarker = (ListTrafficPolicyInstancesResponse -> Maybe RRType)
-> (ListTrafficPolicyInstancesResponse
    -> Maybe RRType -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     (Maybe RRType)
     (Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {Maybe RRType
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> Maybe RRType
trafficPolicyInstanceTypeMarker} -> Maybe RRType
trafficPolicyInstanceTypeMarker) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} Maybe RRType
a -> ListTrafficPolicyInstancesResponse
s {$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesResponse' :: Maybe RRType
trafficPolicyInstanceTypeMarker = Maybe RRType
a} :: ListTrafficPolicyInstancesResponse)

-- | If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
-- zone of the first traffic policy instance that Route 53 will return if
-- you submit another @ListTrafficPolicyInstances@ request.
listTrafficPolicyInstancesResponse_hostedZoneIdMarker :: Lens.Lens' ListTrafficPolicyInstancesResponse (Prelude.Maybe ResourceId)
listTrafficPolicyInstancesResponse_hostedZoneIdMarker :: (Maybe ResourceId -> f (Maybe ResourceId))
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_hostedZoneIdMarker = (ListTrafficPolicyInstancesResponse -> Maybe ResourceId)
-> (ListTrafficPolicyInstancesResponse
    -> Maybe ResourceId -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     (Maybe ResourceId)
     (Maybe ResourceId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {Maybe ResourceId
hostedZoneIdMarker :: Maybe ResourceId
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> Maybe ResourceId
hostedZoneIdMarker} -> Maybe ResourceId
hostedZoneIdMarker) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} Maybe ResourceId
a -> ListTrafficPolicyInstancesResponse
s {$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesResponse' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
a} :: ListTrafficPolicyInstancesResponse)

-- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
-- name of the first traffic policy instance that Route 53 will return if
-- you submit another @ListTrafficPolicyInstances@ request.
listTrafficPolicyInstancesResponse_trafficPolicyInstanceNameMarker :: Lens.Lens' ListTrafficPolicyInstancesResponse (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstancesResponse_trafficPolicyInstanceNameMarker :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_trafficPolicyInstanceNameMarker = (ListTrafficPolicyInstancesResponse -> Maybe Text)
-> (ListTrafficPolicyInstancesResponse
    -> Maybe Text -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {Maybe Text
trafficPolicyInstanceNameMarker :: Maybe Text
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> Maybe Text
trafficPolicyInstanceNameMarker} -> Maybe Text
trafficPolicyInstanceNameMarker) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} Maybe Text
a -> ListTrafficPolicyInstancesResponse
s {$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesResponse' :: Maybe Text
trafficPolicyInstanceNameMarker = Maybe Text
a} :: ListTrafficPolicyInstancesResponse)

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

-- | A list that contains one @TrafficPolicyInstance@ element for each
-- traffic policy instance that matches the elements in the request.
listTrafficPolicyInstancesResponse_trafficPolicyInstances :: Lens.Lens' ListTrafficPolicyInstancesResponse [TrafficPolicyInstance]
listTrafficPolicyInstancesResponse_trafficPolicyInstances :: ([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_trafficPolicyInstances = (ListTrafficPolicyInstancesResponse -> [TrafficPolicyInstance])
-> (ListTrafficPolicyInstancesResponse
    -> [TrafficPolicyInstance] -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     [TrafficPolicyInstance]
     [TrafficPolicyInstance]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {[TrafficPolicyInstance]
trafficPolicyInstances :: [TrafficPolicyInstance]
$sel:trafficPolicyInstances:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> [TrafficPolicyInstance]
trafficPolicyInstances} -> [TrafficPolicyInstance]
trafficPolicyInstances) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} [TrafficPolicyInstance]
a -> ListTrafficPolicyInstancesResponse
s {$sel:trafficPolicyInstances:ListTrafficPolicyInstancesResponse' :: [TrafficPolicyInstance]
trafficPolicyInstances = [TrafficPolicyInstance]
a} :: ListTrafficPolicyInstancesResponse) (([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
 -> ListTrafficPolicyInstancesResponse
 -> f ListTrafficPolicyInstancesResponse)
-> (([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
    -> [TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. ([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> [TrafficPolicyInstance] -> f [TrafficPolicyInstance]
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 policy instances to
-- be listed. If the response was truncated, you can get more traffic
-- policy instances by calling @ListTrafficPolicyInstances@ again and
-- specifying the values of the @HostedZoneIdMarker@,
-- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
-- in the corresponding request parameters.
listTrafficPolicyInstancesResponse_isTruncated :: Lens.Lens' ListTrafficPolicyInstancesResponse Prelude.Bool
listTrafficPolicyInstancesResponse_isTruncated :: (Bool -> f Bool)
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_isTruncated = (ListTrafficPolicyInstancesResponse -> Bool)
-> (ListTrafficPolicyInstancesResponse
    -> Bool -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     Bool
     Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {Bool
isTruncated :: Bool
$sel:isTruncated:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> Bool
isTruncated} -> Bool
isTruncated) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} Bool
a -> ListTrafficPolicyInstancesResponse
s {$sel:isTruncated:ListTrafficPolicyInstancesResponse' :: Bool
isTruncated = Bool
a} :: ListTrafficPolicyInstancesResponse)

-- | The value that you specified for the @MaxItems@ parameter in the call to
-- @ListTrafficPolicyInstances@ that produced the current response.
listTrafficPolicyInstancesResponse_maxItems :: Lens.Lens' ListTrafficPolicyInstancesResponse Prelude.Text
listTrafficPolicyInstancesResponse_maxItems :: (Text -> f Text)
-> ListTrafficPolicyInstancesResponse
-> f ListTrafficPolicyInstancesResponse
listTrafficPolicyInstancesResponse_maxItems = (ListTrafficPolicyInstancesResponse -> Text)
-> (ListTrafficPolicyInstancesResponse
    -> Text -> ListTrafficPolicyInstancesResponse)
-> Lens
     ListTrafficPolicyInstancesResponse
     ListTrafficPolicyInstancesResponse
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesResponse' {Text
maxItems :: Text
$sel:maxItems:ListTrafficPolicyInstancesResponse' :: ListTrafficPolicyInstancesResponse -> Text
maxItems} -> Text
maxItems) (\s :: ListTrafficPolicyInstancesResponse
s@ListTrafficPolicyInstancesResponse' {} Text
a -> ListTrafficPolicyInstancesResponse
s {$sel:maxItems:ListTrafficPolicyInstancesResponse' :: Text
maxItems = Text
a} :: ListTrafficPolicyInstancesResponse)

instance
  Prelude.NFData
    ListTrafficPolicyInstancesResponse