{-# 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-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Gets information about the 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_hostedZoneIdMarker,
    listTrafficPolicyInstancesByPolicy_maxItems,
    listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker,
    listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstancesByPolicy_trafficPolicyId,
    listTrafficPolicyInstancesByPolicy_trafficPolicyVersion,

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

    -- * Response Lenses
    listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker,
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker,
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker,
    listTrafficPolicyInstancesByPolicyResponse_httpStatus,
    listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances,
    listTrafficPolicyInstancesByPolicyResponse_isTruncated,
    listTrafficPolicyInstancesByPolicyResponse_maxItems,
  )
where

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

-- | A complex type that contains the information about the request to list
-- 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 @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,
    -- | 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 @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,
    -- | 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 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
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]
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
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.
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:
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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.
--
-- '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'
      { $sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe ResourceId
hostedZoneIdMarker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
maxItems = forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe Text
trafficPolicyInstanceNameMarker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
          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 @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 :: Lens' ListTrafficPolicyInstancesByPolicy (Maybe ResourceId)
listTrafficPolicyInstancesByPolicy_hostedZoneIdMarker = 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)

-- | 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 :: Lens' ListTrafficPolicyInstancesByPolicy (Maybe Text)
listTrafficPolicyInstancesByPolicy_maxItems = 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 @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 :: Lens' ListTrafficPolicyInstancesByPolicy (Maybe Text)
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceNameMarker = 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)

-- | 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 :: Lens' ListTrafficPolicyInstancesByPolicy (Maybe RRType)
listTrafficPolicyInstancesByPolicy_trafficPolicyInstanceTypeMarker = 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 ID of the traffic policy for which you want to list traffic policy
-- instances.
listTrafficPolicyInstancesByPolicy_trafficPolicyId :: Lens.Lens' ListTrafficPolicyInstancesByPolicy Prelude.Text
listTrafficPolicyInstancesByPolicy_trafficPolicyId :: Lens' ListTrafficPolicyInstancesByPolicy Text
listTrafficPolicyInstancesByPolicy_trafficPolicyId = 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 :: Lens' ListTrafficPolicyInstancesByPolicy Natural
listTrafficPolicyInstancesByPolicy_trafficPolicyVersion = 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 :: (Service -> Service)
-> ListTrafficPolicyInstancesByPolicy
-> Request ListTrafficPolicyInstancesByPolicy
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.get (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy ListTrafficPolicyInstancesByPolicy
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse ListTrafficPolicyInstancesByPolicy)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
(Int -> ResponseHeaders -> [Node] -> Either String (AWSResponse a))
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveXML
      ( \Int
s ResponseHeaders
h [Node]
x ->
          Maybe ResourceId
-> Maybe Text
-> Maybe RRType
-> Int
-> [TrafficPolicyInstance]
-> Bool
-> Text
-> ListTrafficPolicyInstancesByPolicyResponse
ListTrafficPolicyInstancesByPolicyResponse'
            forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"HostedZoneIdMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TrafficPolicyInstanceNameMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TrafficPolicyInstanceTypeMarker")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (forall (f :: * -> *) a. Applicative f => a -> f a
Prelude.pure (forall a. Enum a => a -> Int
Prelude.fromEnum Int
s))
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( [Node]
x
                            forall a. FromXML a => [Node] -> Text -> Either String (Maybe a)
Data..@? Text
"TrafficPolicyInstances"
                            forall (f :: * -> *) a. Functor f => f (Maybe a) -> a -> f a
Core..!@ forall a. Monoid a => a
Prelude.mempty
                            forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
Prelude.>>= forall a. FromXML a => Text -> [Node] -> Either String [a]
Data.parseXMLList Text
"TrafficPolicyInstance"
                        )
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"IsTruncated")
            forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x forall a. FromXML a => [Node] -> Text -> Either String a
Data..@ Text
"MaxItems")
      )

instance
  Prelude.Hashable
    ListTrafficPolicyInstancesByPolicy
  where
  hashWithSalt :: Int -> ListTrafficPolicyInstancesByPolicy -> Int
hashWithSalt
    Int
_salt
    ListTrafficPolicyInstancesByPolicy' {Natural
Maybe Text
Maybe ResourceId
Maybe RRType
Text
trafficPolicyVersion :: Natural
trafficPolicyId :: Text
trafficPolicyInstanceTypeMarker :: Maybe RRType
trafficPolicyInstanceNameMarker :: Maybe Text
maxItems :: Maybe Text
hostedZoneIdMarker :: Maybe ResourceId
$sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Natural
$sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Text
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe RRType
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe ResourceId
..} =
      Int
_salt
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe ResourceId
hostedZoneIdMarker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxItems
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
trafficPolicyInstanceNameMarker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe RRType
trafficPolicyInstanceTypeMarker
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
trafficPolicyId
        forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
trafficPolicyVersion

instance
  Prelude.NFData
    ListTrafficPolicyInstancesByPolicy
  where
  rnf :: ListTrafficPolicyInstancesByPolicy -> ()
rnf ListTrafficPolicyInstancesByPolicy' {Natural
Maybe Text
Maybe ResourceId
Maybe RRType
Text
trafficPolicyVersion :: Natural
trafficPolicyId :: Text
trafficPolicyInstanceTypeMarker :: Maybe RRType
trafficPolicyInstanceNameMarker :: Maybe Text
maxItems :: Maybe Text
hostedZoneIdMarker :: Maybe ResourceId
$sel:trafficPolicyVersion:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Natural
$sel:trafficPolicyId:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Text
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe RRType
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:maxItems:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe Text
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicy' :: ListTrafficPolicyInstancesByPolicy -> Maybe ResourceId
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceId
hostedZoneIdMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trafficPolicyInstanceNameMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RRType
trafficPolicyInstanceTypeMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
trafficPolicyId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
trafficPolicyVersion

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

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

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

-- | A complex type that contains the response information for the request.
--
-- /See:/ 'newListTrafficPolicyInstancesByPolicyResponse' smart constructor.
data ListTrafficPolicyInstancesByPolicyResponse = 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 -> 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,
    -- | 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,
    -- | 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
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]
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
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.
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:
--
-- '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.
--
-- '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.
--
-- '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'
      { $sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe ResourceId
hostedZoneIdMarker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe Text
trafficPolicyInstanceNameMarker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicyResponse' :: Maybe RRType
trafficPolicyInstanceTypeMarker =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListTrafficPolicyInstancesByPolicyResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:trafficPolicyInstances:ListTrafficPolicyInstancesByPolicyResponse' :: [TrafficPolicyInstance]
trafficPolicyInstances =
          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@, @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 :: Lens' ListTrafficPolicyInstancesByPolicyResponse (Maybe ResourceId)
listTrafficPolicyInstancesByPolicyResponse_hostedZoneIdMarker = 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 :: Lens' ListTrafficPolicyInstancesByPolicyResponse (Maybe Text)
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceNameMarker = 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)

-- | 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 :: Lens' ListTrafficPolicyInstancesByPolicyResponse (Maybe RRType)
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstanceTypeMarker = 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)

-- | The response's http status code.
listTrafficPolicyInstancesByPolicyResponse_httpStatus :: Lens.Lens' ListTrafficPolicyInstancesByPolicyResponse Prelude.Int
listTrafficPolicyInstancesByPolicyResponse_httpStatus :: Lens' ListTrafficPolicyInstancesByPolicyResponse Int
listTrafficPolicyInstancesByPolicyResponse_httpStatus = 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 :: Lens'
  ListTrafficPolicyInstancesByPolicyResponse [TrafficPolicyInstance]
listTrafficPolicyInstancesByPolicyResponse_trafficPolicyInstances = 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) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced

-- | A flag that indicates whether there are more traffic 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 :: Lens' ListTrafficPolicyInstancesByPolicyResponse Bool
listTrafficPolicyInstancesByPolicyResponse_isTruncated = 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 :: Lens' ListTrafficPolicyInstancesByPolicyResponse Text
listTrafficPolicyInstancesByPolicyResponse_maxItems = 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
  where
  rnf :: ListTrafficPolicyInstancesByPolicyResponse -> ()
rnf ListTrafficPolicyInstancesByPolicyResponse' {Bool
Int
[TrafficPolicyInstance]
Maybe Text
Maybe ResourceId
Maybe RRType
Text
maxItems :: Text
isTruncated :: Bool
trafficPolicyInstances :: [TrafficPolicyInstance]
httpStatus :: Int
trafficPolicyInstanceTypeMarker :: Maybe RRType
trafficPolicyInstanceNameMarker :: Maybe Text
hostedZoneIdMarker :: Maybe ResourceId
$sel:maxItems:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Text
$sel:isTruncated:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Bool
$sel:trafficPolicyInstances:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse
-> [TrafficPolicyInstance]
$sel:httpStatus:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Int
$sel:trafficPolicyInstanceTypeMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe RRType
$sel:trafficPolicyInstanceNameMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe Text
$sel:hostedZoneIdMarker:ListTrafficPolicyInstancesByPolicyResponse' :: ListTrafficPolicyInstancesByPolicyResponse -> Maybe ResourceId
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe ResourceId
hostedZoneIdMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
trafficPolicyInstanceNameMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe RRType
trafficPolicyInstanceTypeMarker
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [TrafficPolicyInstance]
trafficPolicyInstances
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Bool
isTruncated
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
maxItems