{-# 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.ListTrafficPolicyInstancesByPolicy
-- 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 a specify traffic policy version.
--
-- After you submit a @CreateTrafficPolicyInstance@ or 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.ListTrafficPolicyInstancesByPolicy
  ( -- * Creating a Request
    ListTrafficPolicyInstancesByPolicy (..),
    newListTrafficPolicyInstancesByPolicy,

    -- * Request Lenses
    listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstancesByPolicy_maxItems,
    listTrafficPolicyInstancesByPolicy_hostedZoneIdMarker,
    listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker,
    listTrafficPolicyInstancesByPolicy_trafficPolicyId,
    listTrafficPolicyInstancesByPolicy_trafficPolicyVersion,

    -- * Destructuring the Response
    ListTrafficPolicyInstancesByPolicyResponse (..),
    newListTrafficPolicyInstancesByPolicyResponse,

    -- * Response Lenses
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker,
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker,
    listTrafficPolicyInstancesByPolicyResponse_httpStatus,
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances,
    listTrafficPolicyInstancesByPolicyResponse_isTruncated,
    listTrafficPolicyInstancesByPolicyResponse_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 complex type that contains the information about the request to list
-- your traffic policy instances.
--
-- /See:/ 'newListTrafficPolicyInstancesByPolicy' smart constructor.
data ListTrafficPolicyInstancesByPolicy = ListTrafficPolicyInstancesByPolicy'
  { -- | 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 @ListTrafficPolicyInstancesByPolicy@ request.
    --
    -- For the value of @trafficpolicyinstancetype@, specify the value of
    -- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
    -- the name of the first traffic policy instance that Amazon Route 53 will
    -- return if you submit another request.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstancesByPolicy -> Maybe RRType
trafficPolicyInstanceTypeMarker :: Prelude.Maybe RRType,
    -- | The maximum number of traffic policy instances to be included in the
    -- response body for this 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 that Amazon Route 53 will
    -- return if you submit another request.
    ListTrafficPolicyInstancesByPolicy -> 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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
    -- return if you submit another request.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstancesByPolicy -> 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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
    -- return if you submit another request.
    --
    -- If the value of @IsTruncated@ in the previous response was @false@,
    -- there are no more traffic policy instances to get.
    ListTrafficPolicyInstancesByPolicy -> Maybe Text
trafficPolicyInstanceNameMarker :: Prelude.Maybe Prelude.Text,
    -- | The ID of the traffic policy for which you want to list traffic policy
    -- instances.
    ListTrafficPolicyInstancesByPolicy -> Text
trafficPolicyId :: Prelude.Text,
    -- | The version of the traffic policy for which you want to list traffic
    -- policy instances. The version must be associated with the traffic policy
    -- that is specified by @TrafficPolicyId@.
    ListTrafficPolicyInstancesByPolicy -> Natural
trafficPolicyVersion :: Prelude.Natural
  }
  deriving (ListTrafficPolicyInstancesByPolicy
-> ListTrafficPolicyInstancesByPolicy -> Bool
(ListTrafficPolicyInstancesByPolicy
 -> ListTrafficPolicyInstancesByPolicy -> Bool)
-> (ListTrafficPolicyInstancesByPolicy
    -> ListTrafficPolicyInstancesByPolicy -> Bool)
-> Eq ListTrafficPolicyInstancesByPolicy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPolicyInstancesByPolicy
-> ListTrafficPolicyInstancesByPolicy -> Bool
$c/= :: ListTrafficPolicyInstancesByPolicy
-> ListTrafficPolicyInstancesByPolicy -> Bool
== :: ListTrafficPolicyInstancesByPolicy
-> ListTrafficPolicyInstancesByPolicy -> Bool
$c== :: ListTrafficPolicyInstancesByPolicy
-> ListTrafficPolicyInstancesByPolicy -> Bool
Prelude.Eq, ReadPrec [ListTrafficPolicyInstancesByPolicy]
ReadPrec ListTrafficPolicyInstancesByPolicy
Int -> ReadS ListTrafficPolicyInstancesByPolicy
ReadS [ListTrafficPolicyInstancesByPolicy]
(Int -> ReadS ListTrafficPolicyInstancesByPolicy)
-> ReadS [ListTrafficPolicyInstancesByPolicy]
-> ReadPrec ListTrafficPolicyInstancesByPolicy
-> ReadPrec [ListTrafficPolicyInstancesByPolicy]
-> Read ListTrafficPolicyInstancesByPolicy
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPolicyInstancesByPolicy]
$creadListPrec :: ReadPrec [ListTrafficPolicyInstancesByPolicy]
readPrec :: ReadPrec ListTrafficPolicyInstancesByPolicy
$creadPrec :: ReadPrec ListTrafficPolicyInstancesByPolicy
readList :: ReadS [ListTrafficPolicyInstancesByPolicy]
$creadList :: ReadS [ListTrafficPolicyInstancesByPolicy]
readsPrec :: Int -> ReadS ListTrafficPolicyInstancesByPolicy
$creadsPrec :: Int -> ReadS ListTrafficPolicyInstancesByPolicy
Prelude.Read, Int -> ListTrafficPolicyInstancesByPolicy -> ShowS
[ListTrafficPolicyInstancesByPolicy] -> ShowS
ListTrafficPolicyInstancesByPolicy -> String
(Int -> ListTrafficPolicyInstancesByPolicy -> ShowS)
-> (ListTrafficPolicyInstancesByPolicy -> String)
-> ([ListTrafficPolicyInstancesByPolicy] -> ShowS)
-> Show ListTrafficPolicyInstancesByPolicy
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPolicyInstancesByPolicy] -> ShowS
$cshowList :: [ListTrafficPolicyInstancesByPolicy] -> ShowS
show :: ListTrafficPolicyInstancesByPolicy -> String
$cshow :: ListTrafficPolicyInstancesByPolicy -> String
showsPrec :: Int -> ListTrafficPolicyInstancesByPolicy -> ShowS
$cshowsPrec :: Int -> ListTrafficPolicyInstancesByPolicy -> ShowS
Prelude.Show, (forall x.
 ListTrafficPolicyInstancesByPolicy
 -> Rep ListTrafficPolicyInstancesByPolicy x)
-> (forall x.
    Rep ListTrafficPolicyInstancesByPolicy x
    -> ListTrafficPolicyInstancesByPolicy)
-> Generic ListTrafficPolicyInstancesByPolicy
forall x.
Rep ListTrafficPolicyInstancesByPolicy x
-> ListTrafficPolicyInstancesByPolicy
forall x.
ListTrafficPolicyInstancesByPolicy
-> Rep ListTrafficPolicyInstancesByPolicy x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrafficPolicyInstancesByPolicy x
-> ListTrafficPolicyInstancesByPolicy
$cfrom :: forall x.
ListTrafficPolicyInstancesByPolicy
-> Rep ListTrafficPolicyInstancesByPolicy x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPolicyInstancesByPolicy' 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', 'listTrafficPolicyInstancesByPolicy_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 @ListTrafficPolicyInstancesByPolicy@ request.
--
-- For the value of @trafficpolicyinstancetype@, specify the value of
-- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
-- the name of the first traffic policy instance that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
--
-- 'maxItems', 'listTrafficPolicyInstancesByPolicy_maxItems' - The maximum number of traffic policy instances to be included in the
-- response body for this 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 that Amazon Route 53 will
-- return if you submit another request.
--
-- 'hostedZoneIdMarker', 'listTrafficPolicyInstancesByPolicy_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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
--
-- 'trafficPolicyInstanceNameMarker', 'listTrafficPolicyInstancesByPolicy_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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
--
-- 'trafficPolicyId', 'listTrafficPolicyInstancesByPolicy_trafficPolicyId' - The ID of the traffic policy for which you want to list traffic policy
-- instances.
--
-- 'trafficPolicyVersion', 'listTrafficPolicyInstancesByPolicy_trafficPolicyVersion' - The version of the traffic policy for which you want to list traffic
-- policy instances. The version must be associated with the traffic policy
-- that is specified by @TrafficPolicyId@.
newListTrafficPolicyInstancesByPolicy ::
  -- | 'trafficPolicyId'
  Prelude.Text ->
  -- | 'trafficPolicyVersion'
  Prelude.Natural ->
  ListTrafficPolicyInstancesByPolicy
newListTrafficPolicyInstancesByPolicy :: Text -> Natural -> ListTrafficPolicyInstancesByPolicy
newListTrafficPolicyInstancesByPolicy
  Text
pTrafficPolicyId_
  Natural
pTrafficPolicyVersion_ =
    ListTrafficPolicyInstancesByPolicy' :: Maybe RRType
-> Maybe Text
-> Maybe ResourceId
-> Maybe Text
-> Text
-> Natural
-> ListTrafficPolicyInstancesByPolicy
ListTrafficPolicyInstancesByPolicy'
      { $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
          Maybe RRType
forall a. Maybe a
Prelude.Nothing,
        $sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
maxItems = Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
trafficPolicyInstanceNameMarker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: Text
trafficPolicyId = Text
pTrafficPolicyId_,
        $sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: Natural
trafficPolicyVersion =
          Natural
pTrafficPolicyVersion_
      }

-- | 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 @ListTrafficPolicyInstancesByPolicy@ request.
--
-- For the value of @trafficpolicyinstancetype@, specify the value of
-- @TrafficPolicyInstanceTypeMarker@ from the previous response, which is
-- the name of the first traffic policy instance that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicy (Prelude.Maybe RRType)
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker :: (Maybe RRType -> f (Maybe RRType))
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker = (ListTrafficPolicyInstancesByPolicy -> Maybe RRType)
-> (ListTrafficPolicyInstancesByPolicy
    -> Maybe RRType -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     (Maybe RRType)
     (Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Maybe RRType
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe RRType
trafficPolicyInstanceTypeMarker} -> Maybe RRType
trafficPolicyInstanceTypeMarker) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Maybe RRType
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe RRType
trafficPolicyInstanceTypeMarker = Maybe RRType
a} :: ListTrafficPolicyInstancesByPolicy)

-- | The maximum number of traffic policy instances to be included in the
-- response body for this 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 that Amazon Route 53 will
-- return if you submit another request.
listTrafficPolicyInstancesByPolicy_maxItems :: Lens.Lens' ListTrafficPolicyInstancesByPolicy (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstancesByPolicy_maxItems :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_maxItems = (ListTrafficPolicyInstancesByPolicy -> Maybe Text)
-> (ListTrafficPolicyInstancesByPolicy
    -> Maybe Text -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Maybe Text
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
maxItems = Maybe Text
a} :: ListTrafficPolicyInstancesByPolicy)

-- | 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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstancesByPolicy_hostedZoneIdMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicy (Prelude.Maybe ResourceId)
listTrafficPolicyInstancesByPolicy_hostedZoneIdMarker :: (Maybe ResourceId -> f (Maybe ResourceId))
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_hostedZoneIdMarker = (ListTrafficPolicyInstancesByPolicy -> Maybe ResourceId)
-> (ListTrafficPolicyInstancesByPolicy
    -> Maybe ResourceId -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     (Maybe ResourceId)
     (Maybe ResourceId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Maybe ResourceId
hostedZoneIdMarker :: Maybe ResourceId
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe ResourceId
hostedZoneIdMarker} -> Maybe ResourceId
hostedZoneIdMarker) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Maybe ResourceId
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
a} :: ListTrafficPolicyInstancesByPolicy)

-- | 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 @ListTrafficPolicyInstancesByPolicy@ 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 that Amazon Route 53 will
-- return if you submit another request.
--
-- If the value of @IsTruncated@ in the previous response was @false@,
-- there are no more traffic policy instances to get.
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicy (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker = (ListTrafficPolicyInstancesByPolicy -> Maybe Text)
-> (ListTrafficPolicyInstancesByPolicy
    -> Maybe Text -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Maybe Text
trafficPolicyInstanceNameMarker :: Maybe Text
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
trafficPolicyInstanceNameMarker} -> Maybe Text
trafficPolicyInstanceNameMarker) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Maybe Text
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
trafficPolicyInstanceNameMarker = Maybe Text
a} :: ListTrafficPolicyInstancesByPolicy)

-- | The ID of the traffic policy for which you want to list traffic policy
-- instances.
listTrafficPolicyInstancesByPolicy_trafficPolicyId :: Lens.Lens' ListTrafficPolicyInstancesByPolicy Prelude.Text
listTrafficPolicyInstancesByPolicy_trafficPolicyId :: (Text -> f Text)
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_trafficPolicyId = (ListTrafficPolicyInstancesByPolicy -> Text)
-> (ListTrafficPolicyInstancesByPolicy
    -> Text -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     Text
     Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Text
trafficPolicyId :: Text
$sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Text
trafficPolicyId} -> Text
trafficPolicyId) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Text
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: Text
trafficPolicyId = Text
a} :: ListTrafficPolicyInstancesByPolicy)

-- | The version of the traffic policy for which you want to list traffic
-- policy instances. The version must be associated with the traffic policy
-- that is specified by @TrafficPolicyId@.
listTrafficPolicyInstancesByPolicy_trafficPolicyVersion :: Lens.Lens' ListTrafficPolicyInstancesByPolicy Prelude.Natural
listTrafficPolicyInstancesByPolicy_trafficPolicyVersion :: (Natural -> f Natural)
-> ListTrafficPolicyInstancesByPolicy
-> f ListTrafficPolicyInstancesByPolicy
listTrafficPolicyInstancesByPolicy_trafficPolicyVersion = (ListTrafficPolicyInstancesByPolicy -> Natural)
-> (ListTrafficPolicyInstancesByPolicy
    -> Natural -> ListTrafficPolicyInstancesByPolicy)
-> Lens
     ListTrafficPolicyInstancesByPolicy
     ListTrafficPolicyInstancesByPolicy
     Natural
     Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicy' {Natural
trafficPolicyVersion :: Natural
$sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Natural
trafficPolicyVersion} -> Natural
trafficPolicyVersion) (\s :: ListTrafficPolicyInstancesByPolicy
s@ListTrafficPolicyInstancesByPolicy' {} Natural
a -> ListTrafficPolicyInstancesByPolicy
s {$sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: Natural
trafficPolicyVersion = Natural
a} :: ListTrafficPolicyInstancesByPolicy)

instance
  Core.AWSRequest
    ListTrafficPolicyInstancesByPolicy
  where
  type
    AWSResponse ListTrafficPolicyInstancesByPolicy =
      ListTrafficPolicyInstancesByPolicyResponse
  request :: ListTrafficPolicyInstancesByPolicy
-> Request ListTrafficPolicyInstancesByPolicy
request = Service
-> ListTrafficPolicyInstancesByPolicy
-> Request ListTrafficPolicyInstancesByPolicy
forall a. ToRequest a => Service -> a -> Request a
Request.get Service
defaultService
  response :: Logger
-> Service
-> Proxy ListTrafficPolicyInstancesByPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListTrafficPolicyInstancesByPolicy)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse ListTrafficPolicyInstancesByPolicy))
-> Logger
-> Service
-> Proxy ListTrafficPolicyInstancesByPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListTrafficPolicyInstancesByPolicy)))
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
-> ListTrafficPolicyInstancesByPolicyResponse
ListTrafficPolicyInstancesByPolicyResponse'
            (Maybe RRType
 -> Maybe ResourceId
 -> Maybe Text
 -> Int
 -> [TrafficPolicyInstance]
 -> Bool
 -> Text
 -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String (Maybe RRType)
-> Either
     String
     (Maybe ResourceId
      -> Maybe Text
      -> Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesByPolicyResponse)
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
   -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String (Maybe ResourceId)
-> Either
     String
     (Maybe Text
      -> Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesByPolicyResponse)
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
   -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String (Maybe Text)
-> Either
     String
     (Int
      -> [TrafficPolicyInstance]
      -> Bool
      -> Text
      -> ListTrafficPolicyInstancesByPolicyResponse)
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
   -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String Int
-> Either
     String
     ([TrafficPolicyInstance]
      -> Bool -> Text -> ListTrafficPolicyInstancesByPolicyResponse)
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 -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String [TrafficPolicyInstance]
-> Either
     String (Bool -> Text -> ListTrafficPolicyInstancesByPolicyResponse)
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 -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String Bool
-> Either
     String (Text -> ListTrafficPolicyInstancesByPolicyResponse)
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 -> ListTrafficPolicyInstancesByPolicyResponse)
-> Either String Text
-> Either String ListTrafficPolicyInstancesByPolicyResponse
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
    ListTrafficPolicyInstancesByPolicy

instance
  Prelude.NFData
    ListTrafficPolicyInstancesByPolicy

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

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

instance
  Core.ToQuery
    ListTrafficPolicyInstancesByPolicy
  where
  toQuery :: ListTrafficPolicyInstancesByPolicy -> QueryString
toQuery ListTrafficPolicyInstancesByPolicy' {Natural
Maybe Text
Maybe ResourceId
Maybe RRType
Text
trafficPolicyVersion :: Natural
trafficPolicyId :: Text
trafficPolicyInstanceNameMarker :: Maybe Text
hostedZoneIdMarker :: Maybe ResourceId
maxItems :: Maybe Text
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Natural
$sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Text
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe ResourceId
$sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> 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,
        ByteString
"id" ByteString -> Text -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Text
trafficPolicyId,
        ByteString
"version" ByteString -> Natural -> QueryString
forall a. ToQuery a => ByteString -> a -> QueryString
Core.=: Natural
trafficPolicyVersion
      ]

-- | A complex type that contains the response information for the request.
--
-- /See:/ 'newListTrafficPolicyInstancesByPolicyResponse' smart constructor.
data ListTrafficPolicyInstancesByPolicyResponse = ListTrafficPolicyInstancesByPolicyResponse'
  { -- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceTypeMarker@ is the DNS
    -- type of the resource record sets that are associated with the first
    -- traffic policy instance in the next group of @MaxItems@ traffic policy
    -- instances.
    ListTrafficPolicyInstancesByPolicyResponse -> Maybe RRType
trafficPolicyInstanceTypeMarker :: Prelude.Maybe RRType,
    -- | If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
    -- zone of the first traffic policy instance in the next group of traffic
    -- policy instances.
    ListTrafficPolicyInstancesByPolicyResponse -> Maybe ResourceId
hostedZoneIdMarker :: Prelude.Maybe ResourceId,
    -- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
    -- name of the first traffic policy instance in the next group of
    -- @MaxItems@ traffic policy instances.
    ListTrafficPolicyInstancesByPolicyResponse -> Maybe Text
trafficPolicyInstanceNameMarker :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListTrafficPolicyInstancesByPolicyResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list that contains one @TrafficPolicyInstance@ element for each
    -- traffic policy instance that matches the elements in the request.
    ListTrafficPolicyInstancesByPolicyResponse
-> [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 the next group of
    -- traffic policy instances by calling @ListTrafficPolicyInstancesByPolicy@
    -- again and specifying the values of the @HostedZoneIdMarker@,
    -- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
    -- elements in the corresponding request parameters.
    ListTrafficPolicyInstancesByPolicyResponse -> Bool
isTruncated :: Prelude.Bool,
    -- | The value that you specified for the @MaxItems@ parameter in the call to
    -- @ListTrafficPolicyInstancesByPolicy@ that produced the current response.
    ListTrafficPolicyInstancesByPolicyResponse -> Text
maxItems :: Prelude.Text
  }
  deriving (ListTrafficPolicyInstancesByPolicyResponse
-> ListTrafficPolicyInstancesByPolicyResponse -> Bool
(ListTrafficPolicyInstancesByPolicyResponse
 -> ListTrafficPolicyInstancesByPolicyResponse -> Bool)
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> ListTrafficPolicyInstancesByPolicyResponse -> Bool)
-> Eq ListTrafficPolicyInstancesByPolicyResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListTrafficPolicyInstancesByPolicyResponse
-> ListTrafficPolicyInstancesByPolicyResponse -> Bool
$c/= :: ListTrafficPolicyInstancesByPolicyResponse
-> ListTrafficPolicyInstancesByPolicyResponse -> Bool
== :: ListTrafficPolicyInstancesByPolicyResponse
-> ListTrafficPolicyInstancesByPolicyResponse -> Bool
$c== :: ListTrafficPolicyInstancesByPolicyResponse
-> ListTrafficPolicyInstancesByPolicyResponse -> Bool
Prelude.Eq, ReadPrec [ListTrafficPolicyInstancesByPolicyResponse]
ReadPrec ListTrafficPolicyInstancesByPolicyResponse
Int -> ReadS ListTrafficPolicyInstancesByPolicyResponse
ReadS [ListTrafficPolicyInstancesByPolicyResponse]
(Int -> ReadS ListTrafficPolicyInstancesByPolicyResponse)
-> ReadS [ListTrafficPolicyInstancesByPolicyResponse]
-> ReadPrec ListTrafficPolicyInstancesByPolicyResponse
-> ReadPrec [ListTrafficPolicyInstancesByPolicyResponse]
-> Read ListTrafficPolicyInstancesByPolicyResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListTrafficPolicyInstancesByPolicyResponse]
$creadListPrec :: ReadPrec [ListTrafficPolicyInstancesByPolicyResponse]
readPrec :: ReadPrec ListTrafficPolicyInstancesByPolicyResponse
$creadPrec :: ReadPrec ListTrafficPolicyInstancesByPolicyResponse
readList :: ReadS [ListTrafficPolicyInstancesByPolicyResponse]
$creadList :: ReadS [ListTrafficPolicyInstancesByPolicyResponse]
readsPrec :: Int -> ReadS ListTrafficPolicyInstancesByPolicyResponse
$creadsPrec :: Int -> ReadS ListTrafficPolicyInstancesByPolicyResponse
Prelude.Read, Int -> ListTrafficPolicyInstancesByPolicyResponse -> ShowS
[ListTrafficPolicyInstancesByPolicyResponse] -> ShowS
ListTrafficPolicyInstancesByPolicyResponse -> String
(Int -> ListTrafficPolicyInstancesByPolicyResponse -> ShowS)
-> (ListTrafficPolicyInstancesByPolicyResponse -> String)
-> ([ListTrafficPolicyInstancesByPolicyResponse] -> ShowS)
-> Show ListTrafficPolicyInstancesByPolicyResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListTrafficPolicyInstancesByPolicyResponse] -> ShowS
$cshowList :: [ListTrafficPolicyInstancesByPolicyResponse] -> ShowS
show :: ListTrafficPolicyInstancesByPolicyResponse -> String
$cshow :: ListTrafficPolicyInstancesByPolicyResponse -> String
showsPrec :: Int -> ListTrafficPolicyInstancesByPolicyResponse -> ShowS
$cshowsPrec :: Int -> ListTrafficPolicyInstancesByPolicyResponse -> ShowS
Prelude.Show, (forall x.
 ListTrafficPolicyInstancesByPolicyResponse
 -> Rep ListTrafficPolicyInstancesByPolicyResponse x)
-> (forall x.
    Rep ListTrafficPolicyInstancesByPolicyResponse x
    -> ListTrafficPolicyInstancesByPolicyResponse)
-> Generic ListTrafficPolicyInstancesByPolicyResponse
forall x.
Rep ListTrafficPolicyInstancesByPolicyResponse x
-> ListTrafficPolicyInstancesByPolicyResponse
forall x.
ListTrafficPolicyInstancesByPolicyResponse
-> Rep ListTrafficPolicyInstancesByPolicyResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListTrafficPolicyInstancesByPolicyResponse x
-> ListTrafficPolicyInstancesByPolicyResponse
$cfrom :: forall x.
ListTrafficPolicyInstancesByPolicyResponse
-> Rep ListTrafficPolicyInstancesByPolicyResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListTrafficPolicyInstancesByPolicyResponse' 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', 'listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker' - If @IsTruncated@ is @true@, @TrafficPolicyInstanceTypeMarker@ is the DNS
-- type of the resource record sets that are associated with the first
-- traffic policy instance in the next group of @MaxItems@ traffic policy
-- instances.
--
-- 'hostedZoneIdMarker', 'listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker' - If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
-- zone of the first traffic policy instance in the next group of traffic
-- policy instances.
--
-- 'trafficPolicyInstanceNameMarker', 'listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker' - If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
-- name of the first traffic policy instance in the next group of
-- @MaxItems@ traffic policy instances.
--
-- 'httpStatus', 'listTrafficPolicyInstancesByPolicyResponse_httpStatus' - The response's http status code.
--
-- 'trafficPolicyInstances', 'listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances' - A list that contains one @TrafficPolicyInstance@ element for each
-- traffic policy instance that matches the elements in the request.
--
-- 'isTruncated', 'listTrafficPolicyInstancesByPolicyResponse_isTruncated' - A flag that indicates whether there are more traffic policy instances to
-- be listed. If the response was truncated, you can get the next group of
-- traffic policy instances by calling @ListTrafficPolicyInstancesByPolicy@
-- again and specifying the values of the @HostedZoneIdMarker@,
-- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
-- elements in the corresponding request parameters.
--
-- 'maxItems', 'listTrafficPolicyInstancesByPolicyResponse_maxItems' - The value that you specified for the @MaxItems@ parameter in the call to
-- @ListTrafficPolicyInstancesByPolicy@ that produced the current response.
newListTrafficPolicyInstancesByPolicyResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'isTruncated'
  Prelude.Bool ->
  -- | 'maxItems'
  Prelude.Text ->
  ListTrafficPolicyInstancesByPolicyResponse
newListTrafficPolicyInstancesByPolicyResponse :: Int -> Bool -> Text -> ListTrafficPolicyInstancesByPolicyResponse
newListTrafficPolicyInstancesByPolicyResponse
  Int
pHttpStatus_
  Bool
pIsTruncated_
  Text
pMaxItems_ =
    ListTrafficPolicyInstancesByPolicyResponse' :: Maybe RRType
-> Maybe ResourceId
-> Maybe Text
-> Int
-> [TrafficPolicyInstance]
-> Bool
-> Text
-> ListTrafficPolicyInstancesByPolicyResponse
ListTrafficPolicyInstancesByPolicyResponse'
      { $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
          Maybe RRType
forall a. Maybe a
Prelude.Nothing,
        $sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe ResourceId
hostedZoneIdMarker =
          Maybe ResourceId
forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe Text
trafficPolicyInstanceNameMarker =
          Maybe Text
forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListTrafficPolicyInstancesByPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:trafficPolicyInstances:ListTrafficPolicyInstancesByPolicyResponse' :: [TrafficPolicyInstance]
trafficPolicyInstances =
          [TrafficPolicyInstance]
forall a. Monoid a => a
Prelude.mempty,
        $sel:isTruncated:ListTrafficPolicyInstancesByPolicyResponse' :: Bool
isTruncated = Bool
pIsTruncated_,
        $sel:maxItems:ListTrafficPolicyInstancesByPolicyResponse' :: 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 in the next group of @MaxItems@ traffic policy
-- instances.
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse (Prelude.Maybe RRType)
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker :: (Maybe RRType -> f (Maybe RRType))
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker = (ListTrafficPolicyInstancesByPolicyResponse -> Maybe RRType)
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> Maybe RRType -> ListTrafficPolicyInstancesByPolicyResponse)
-> Lens
     ListTrafficPolicyInstancesByPolicyResponse
     ListTrafficPolicyInstancesByPolicyResponse
     (Maybe RRType)
     (Maybe RRType)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicyResponse' {Maybe RRType
trafficPolicyInstanceTypeMarker :: Maybe RRType
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe RRType
trafficPolicyInstanceTypeMarker} -> Maybe RRType
trafficPolicyInstanceTypeMarker) (\s :: ListTrafficPolicyInstancesByPolicyResponse
s@ListTrafficPolicyInstancesByPolicyResponse' {} Maybe RRType
a -> ListTrafficPolicyInstancesByPolicyResponse
s {$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe RRType
trafficPolicyInstanceTypeMarker = Maybe RRType
a} :: ListTrafficPolicyInstancesByPolicyResponse)

-- | If @IsTruncated@ is @true@, @HostedZoneIdMarker@ is the ID of the hosted
-- zone of the first traffic policy instance in the next group of traffic
-- policy instances.
listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse (Prelude.Maybe ResourceId)
listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker :: (Maybe ResourceId -> f (Maybe ResourceId))
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker = (ListTrafficPolicyInstancesByPolicyResponse -> Maybe ResourceId)
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> Maybe ResourceId -> ListTrafficPolicyInstancesByPolicyResponse)
-> Lens
     ListTrafficPolicyInstancesByPolicyResponse
     ListTrafficPolicyInstancesByPolicyResponse
     (Maybe ResourceId)
     (Maybe ResourceId)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicyResponse' {Maybe ResourceId
hostedZoneIdMarker :: Maybe ResourceId
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe ResourceId
hostedZoneIdMarker} -> Maybe ResourceId
hostedZoneIdMarker) (\s :: ListTrafficPolicyInstancesByPolicyResponse
s@ListTrafficPolicyInstancesByPolicyResponse' {} Maybe ResourceId
a -> ListTrafficPolicyInstancesByPolicyResponse
s {$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe ResourceId
hostedZoneIdMarker = Maybe ResourceId
a} :: ListTrafficPolicyInstancesByPolicyResponse)

-- | If @IsTruncated@ is @true@, @TrafficPolicyInstanceNameMarker@ is the
-- name of the first traffic policy instance in the next group of
-- @MaxItems@ traffic policy instances.
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse (Prelude.Maybe Prelude.Text)
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker :: (Maybe Text -> f (Maybe Text))
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker = (ListTrafficPolicyInstancesByPolicyResponse -> Maybe Text)
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> Maybe Text -> ListTrafficPolicyInstancesByPolicyResponse)
-> Lens
     ListTrafficPolicyInstancesByPolicyResponse
     ListTrafficPolicyInstancesByPolicyResponse
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicyResponse' {Maybe Text
trafficPolicyInstanceNameMarker :: Maybe Text
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe Text
trafficPolicyInstanceNameMarker} -> Maybe Text
trafficPolicyInstanceNameMarker) (\s :: ListTrafficPolicyInstancesByPolicyResponse
s@ListTrafficPolicyInstancesByPolicyResponse' {} Maybe Text
a -> ListTrafficPolicyInstancesByPolicyResponse
s {$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe Text
trafficPolicyInstanceNameMarker = Maybe Text
a} :: ListTrafficPolicyInstancesByPolicyResponse)

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

-- | A list that contains one @TrafficPolicyInstance@ element for each
-- traffic policy instance that matches the elements in the request.
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse [TrafficPolicyInstance]
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances :: ([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances = (ListTrafficPolicyInstancesByPolicyResponse
 -> [TrafficPolicyInstance])
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> [TrafficPolicyInstance]
    -> ListTrafficPolicyInstancesByPolicyResponse)
-> Lens
     ListTrafficPolicyInstancesByPolicyResponse
     ListTrafficPolicyInstancesByPolicyResponse
     [TrafficPolicyInstance]
     [TrafficPolicyInstance]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicyResponse' {[TrafficPolicyInstance]
trafficPolicyInstances :: [TrafficPolicyInstance]
$sel:trafficPolicyInstances:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse
-> [TrafficPolicyInstance]
trafficPolicyInstances} -> [TrafficPolicyInstance]
trafficPolicyInstances) (\s :: ListTrafficPolicyInstancesByPolicyResponse
s@ListTrafficPolicyInstancesByPolicyResponse' {} [TrafficPolicyInstance]
a -> ListTrafficPolicyInstancesByPolicyResponse
s {$sel:trafficPolicyInstances:ListTrafficPolicyInstancesByPolicyResponse' :: [TrafficPolicyInstance]
trafficPolicyInstances = [TrafficPolicyInstance]
a} :: ListTrafficPolicyInstancesByPolicyResponse) (([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
 -> ListTrafficPolicyInstancesByPolicyResponse
 -> f ListTrafficPolicyInstancesByPolicyResponse)
-> (([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
    -> [TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ([TrafficPolicyInstance] -> f [TrafficPolicyInstance])
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
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 the next group of
-- traffic policy instances by calling @ListTrafficPolicyInstancesByPolicy@
-- again and specifying the values of the @HostedZoneIdMarker@,
-- @TrafficPolicyInstanceNameMarker@, and @TrafficPolicyInstanceTypeMarker@
-- elements in the corresponding request parameters.
listTrafficPolicyInstancesByPolicyResponse_isTruncated :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse Prelude.Bool
listTrafficPolicyInstancesByPolicyResponse_isTruncated :: (Bool -> f Bool)
-> ListTrafficPolicyInstancesByPolicyResponse
-> f ListTrafficPolicyInstancesByPolicyResponse
listTrafficPolicyInstancesByPolicyResponse_isTruncated = (ListTrafficPolicyInstancesByPolicyResponse -> Bool)
-> (ListTrafficPolicyInstancesByPolicyResponse
    -> Bool -> ListTrafficPolicyInstancesByPolicyResponse)
-> Lens
     ListTrafficPolicyInstancesByPolicyResponse
     ListTrafficPolicyInstancesByPolicyResponse
     Bool
     Bool
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListTrafficPolicyInstancesByPolicyResponse' {Bool
isTruncated :: Bool
$sel:isTruncated:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Bool
isTruncated} -> Bool
isTruncated) (\s :: ListTrafficPolicyInstancesByPolicyResponse
s@ListTrafficPolicyInstancesByPolicyResponse' {} Bool
a -> ListTrafficPolicyInstancesByPolicyResponse
s {$sel:isTruncated:ListTrafficPolicyInstancesByPolicyResponse' :: Bool
isTruncated = Bool
a} :: ListTrafficPolicyInstancesByPolicyResponse)

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

instance
  Prelude.NFData
    ListTrafficPolicyInstancesByPolicyResponse