{-# 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.ListHostedZonesByVPC
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Lists all the private hosted zones that a specified VPC is associated
-- with, regardless of which Amazon Web Services account or Amazon Web
-- Services service owns the hosted zones. The @HostedZoneOwner@ structure
-- in the response contains one of the following values:
--
-- -   An @OwningAccount@ element, which contains the account number of
--     either the current Amazon Web Services account or another Amazon Web
--     Services account. Some services, such as Cloud Map, create hosted
--     zones using the current account.
--
-- -   An @OwningService@ element, which identifies the Amazon Web Services
--     service that created and owns the hosted zone. For example, if a
--     hosted zone was created by Amazon Elastic File System (Amazon EFS),
--     the value of @Owner@ is @efs.amazonaws.com@.
--
-- When listing private hosted zones, the hosted zone and the Amazon VPC
-- must belong to the same partition where the hosted zones were created. A
-- partition is a group of Amazon Web Services Regions. Each Amazon Web
-- Services account is scoped to one partition.
--
-- The following are the supported partitions:
--
-- -   @aws@ - Amazon Web Services Regions
--
-- -   @aws-cn@ - China Regions
--
-- -   @aws-us-gov@ - Amazon Web Services GovCloud (US) Region
--
-- For more information, see
-- <https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html Access Management>
-- in the /Amazon Web Services General Reference/.
module Amazonka.Route53.ListHostedZonesByVPC
  ( -- * Creating a Request
    ListHostedZonesByVPC (..),
    newListHostedZonesByVPC,

    -- * Request Lenses
    listHostedZonesByVPC_maxItems,
    listHostedZonesByVPC_nextToken,
    listHostedZonesByVPC_vPCId,
    listHostedZonesByVPC_vPCRegion,

    -- * Destructuring the Response
    ListHostedZonesByVPCResponse (..),
    newListHostedZonesByVPCResponse,

    -- * Response Lenses
    listHostedZonesByVPCResponse_nextToken,
    listHostedZonesByVPCResponse_httpStatus,
    listHostedZonesByVPCResponse_hostedZoneSummaries,
    listHostedZonesByVPCResponse_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

-- | Lists all the private hosted zones that a specified VPC is associated
-- with, regardless of which Amazon Web Services account created the hosted
-- zones.
--
-- /See:/ 'newListHostedZonesByVPC' smart constructor.
data ListHostedZonesByVPC = ListHostedZonesByVPC'
  { -- | (Optional) The maximum number of hosted zones that you want Amazon Route
    -- 53 to return. If the specified VPC is associated with more than
    -- @MaxItems@ hosted zones, the response includes a @NextToken@ element.
    -- @NextToken@ contains an encrypted token that identifies the first hosted
    -- zone that Route 53 will return if you submit another request.
    ListHostedZonesByVPC -> Maybe Text
maxItems :: Prelude.Maybe Prelude.Text,
    -- | If the previous response included a @NextToken@ element, the specified
    -- VPC is associated with more hosted zones. To get more hosted zones,
    -- submit another @ListHostedZonesByVPC@ request.
    --
    -- For the value of @NextToken@, specify the value of @NextToken@ from the
    -- previous response.
    --
    -- If the previous response didn\'t include a @NextToken@ element, there
    -- are no more hosted zones to get.
    ListHostedZonesByVPC -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The ID of the Amazon VPC that you want to list hosted zones for.
    ListHostedZonesByVPC -> Text
vPCId :: Prelude.Text,
    -- | For the Amazon VPC that you specified for @VPCId@, the Amazon Web
    -- Services Region that you created the VPC in.
    ListHostedZonesByVPC -> VPCRegion
vPCRegion :: VPCRegion
  }
  deriving (ListHostedZonesByVPC -> ListHostedZonesByVPC -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHostedZonesByVPC -> ListHostedZonesByVPC -> Bool
$c/= :: ListHostedZonesByVPC -> ListHostedZonesByVPC -> Bool
== :: ListHostedZonesByVPC -> ListHostedZonesByVPC -> Bool
$c== :: ListHostedZonesByVPC -> ListHostedZonesByVPC -> Bool
Prelude.Eq, ReadPrec [ListHostedZonesByVPC]
ReadPrec ListHostedZonesByVPC
Int -> ReadS ListHostedZonesByVPC
ReadS [ListHostedZonesByVPC]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHostedZonesByVPC]
$creadListPrec :: ReadPrec [ListHostedZonesByVPC]
readPrec :: ReadPrec ListHostedZonesByVPC
$creadPrec :: ReadPrec ListHostedZonesByVPC
readList :: ReadS [ListHostedZonesByVPC]
$creadList :: ReadS [ListHostedZonesByVPC]
readsPrec :: Int -> ReadS ListHostedZonesByVPC
$creadsPrec :: Int -> ReadS ListHostedZonesByVPC
Prelude.Read, Int -> ListHostedZonesByVPC -> ShowS
[ListHostedZonesByVPC] -> ShowS
ListHostedZonesByVPC -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHostedZonesByVPC] -> ShowS
$cshowList :: [ListHostedZonesByVPC] -> ShowS
show :: ListHostedZonesByVPC -> String
$cshow :: ListHostedZonesByVPC -> String
showsPrec :: Int -> ListHostedZonesByVPC -> ShowS
$cshowsPrec :: Int -> ListHostedZonesByVPC -> ShowS
Prelude.Show, forall x. Rep ListHostedZonesByVPC x -> ListHostedZonesByVPC
forall x. ListHostedZonesByVPC -> Rep ListHostedZonesByVPC x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep ListHostedZonesByVPC x -> ListHostedZonesByVPC
$cfrom :: forall x. ListHostedZonesByVPC -> Rep ListHostedZonesByVPC x
Prelude.Generic)

-- |
-- Create a value of 'ListHostedZonesByVPC' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'maxItems', 'listHostedZonesByVPC_maxItems' - (Optional) The maximum number of hosted zones that you want Amazon Route
-- 53 to return. If the specified VPC is associated with more than
-- @MaxItems@ hosted zones, the response includes a @NextToken@ element.
-- @NextToken@ contains an encrypted token that identifies the first hosted
-- zone that Route 53 will return if you submit another request.
--
-- 'nextToken', 'listHostedZonesByVPC_nextToken' - If the previous response included a @NextToken@ element, the specified
-- VPC is associated with more hosted zones. To get more hosted zones,
-- submit another @ListHostedZonesByVPC@ request.
--
-- For the value of @NextToken@, specify the value of @NextToken@ from the
-- previous response.
--
-- If the previous response didn\'t include a @NextToken@ element, there
-- are no more hosted zones to get.
--
-- 'vPCId', 'listHostedZonesByVPC_vPCId' - The ID of the Amazon VPC that you want to list hosted zones for.
--
-- 'vPCRegion', 'listHostedZonesByVPC_vPCRegion' - For the Amazon VPC that you specified for @VPCId@, the Amazon Web
-- Services Region that you created the VPC in.
newListHostedZonesByVPC ::
  -- | 'vPCId'
  Prelude.Text ->
  -- | 'vPCRegion'
  VPCRegion ->
  ListHostedZonesByVPC
newListHostedZonesByVPC :: Text -> VPCRegion -> ListHostedZonesByVPC
newListHostedZonesByVPC Text
pVPCId_ VPCRegion
pVPCRegion_ =
  ListHostedZonesByVPC'
    { $sel:maxItems:ListHostedZonesByVPC' :: Maybe Text
maxItems = forall a. Maybe a
Prelude.Nothing,
      $sel:nextToken:ListHostedZonesByVPC' :: Maybe Text
nextToken = forall a. Maybe a
Prelude.Nothing,
      $sel:vPCId:ListHostedZonesByVPC' :: Text
vPCId = Text
pVPCId_,
      $sel:vPCRegion:ListHostedZonesByVPC' :: VPCRegion
vPCRegion = VPCRegion
pVPCRegion_
    }

-- | (Optional) The maximum number of hosted zones that you want Amazon Route
-- 53 to return. If the specified VPC is associated with more than
-- @MaxItems@ hosted zones, the response includes a @NextToken@ element.
-- @NextToken@ contains an encrypted token that identifies the first hosted
-- zone that Route 53 will return if you submit another request.
listHostedZonesByVPC_maxItems :: Lens.Lens' ListHostedZonesByVPC (Prelude.Maybe Prelude.Text)
listHostedZonesByVPC_maxItems :: Lens' ListHostedZonesByVPC (Maybe Text)
listHostedZonesByVPC_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPC' {Maybe Text
maxItems :: Maybe Text
$sel:maxItems:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
maxItems} -> Maybe Text
maxItems) (\s :: ListHostedZonesByVPC
s@ListHostedZonesByVPC' {} Maybe Text
a -> ListHostedZonesByVPC
s {$sel:maxItems:ListHostedZonesByVPC' :: Maybe Text
maxItems = Maybe Text
a} :: ListHostedZonesByVPC)

-- | If the previous response included a @NextToken@ element, the specified
-- VPC is associated with more hosted zones. To get more hosted zones,
-- submit another @ListHostedZonesByVPC@ request.
--
-- For the value of @NextToken@, specify the value of @NextToken@ from the
-- previous response.
--
-- If the previous response didn\'t include a @NextToken@ element, there
-- are no more hosted zones to get.
listHostedZonesByVPC_nextToken :: Lens.Lens' ListHostedZonesByVPC (Prelude.Maybe Prelude.Text)
listHostedZonesByVPC_nextToken :: Lens' ListHostedZonesByVPC (Maybe Text)
listHostedZonesByVPC_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPC' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHostedZonesByVPC
s@ListHostedZonesByVPC' {} Maybe Text
a -> ListHostedZonesByVPC
s {$sel:nextToken:ListHostedZonesByVPC' :: Maybe Text
nextToken = Maybe Text
a} :: ListHostedZonesByVPC)

-- | The ID of the Amazon VPC that you want to list hosted zones for.
listHostedZonesByVPC_vPCId :: Lens.Lens' ListHostedZonesByVPC Prelude.Text
listHostedZonesByVPC_vPCId :: Lens' ListHostedZonesByVPC Text
listHostedZonesByVPC_vPCId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPC' {Text
vPCId :: Text
$sel:vPCId:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Text
vPCId} -> Text
vPCId) (\s :: ListHostedZonesByVPC
s@ListHostedZonesByVPC' {} Text
a -> ListHostedZonesByVPC
s {$sel:vPCId:ListHostedZonesByVPC' :: Text
vPCId = Text
a} :: ListHostedZonesByVPC)

-- | For the Amazon VPC that you specified for @VPCId@, the Amazon Web
-- Services Region that you created the VPC in.
listHostedZonesByVPC_vPCRegion :: Lens.Lens' ListHostedZonesByVPC VPCRegion
listHostedZonesByVPC_vPCRegion :: Lens' ListHostedZonesByVPC VPCRegion
listHostedZonesByVPC_vPCRegion = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPC' {VPCRegion
vPCRegion :: VPCRegion
$sel:vPCRegion:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> VPCRegion
vPCRegion} -> VPCRegion
vPCRegion) (\s :: ListHostedZonesByVPC
s@ListHostedZonesByVPC' {} VPCRegion
a -> ListHostedZonesByVPC
s {$sel:vPCRegion:ListHostedZonesByVPC' :: VPCRegion
vPCRegion = VPCRegion
a} :: ListHostedZonesByVPC)

instance Core.AWSRequest ListHostedZonesByVPC where
  type
    AWSResponse ListHostedZonesByVPC =
      ListHostedZonesByVPCResponse
  request :: (Service -> Service)
-> ListHostedZonesByVPC -> Request ListHostedZonesByVPC
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 ListHostedZonesByVPC
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse ListHostedZonesByVPC)))
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 Text
-> Int
-> [HostedZoneSummary]
-> Text
-> ListHostedZonesByVPCResponse
ListHostedZonesByVPCResponse'
            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
"NextToken")
            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
"HostedZoneSummaries"
                            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
"HostedZoneSummary"
                        )
            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 ListHostedZonesByVPC where
  hashWithSalt :: Int -> ListHostedZonesByVPC -> Int
hashWithSalt Int
_salt ListHostedZonesByVPC' {Maybe Text
Text
VPCRegion
vPCRegion :: VPCRegion
vPCId :: Text
nextToken :: Maybe Text
maxItems :: Maybe Text
$sel:vPCRegion:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> VPCRegion
$sel:vPCId:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Text
$sel:nextToken:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
$sel:maxItems:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
maxItems
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
nextToken
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
vPCId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VPCRegion
vPCRegion

instance Prelude.NFData ListHostedZonesByVPC where
  rnf :: ListHostedZonesByVPC -> ()
rnf ListHostedZonesByVPC' {Maybe Text
Text
VPCRegion
vPCRegion :: VPCRegion
vPCId :: Text
nextToken :: Maybe Text
maxItems :: Maybe Text
$sel:vPCRegion:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> VPCRegion
$sel:vPCId:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Text
$sel:nextToken:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
$sel:maxItems:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
maxItems
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
vPCId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VPCRegion
vPCRegion

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

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

instance Data.ToQuery ListHostedZonesByVPC where
  toQuery :: ListHostedZonesByVPC -> QueryString
toQuery ListHostedZonesByVPC' {Maybe Text
Text
VPCRegion
vPCRegion :: VPCRegion
vPCId :: Text
nextToken :: Maybe Text
maxItems :: Maybe Text
$sel:vPCRegion:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> VPCRegion
$sel:vPCId:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Text
$sel:nextToken:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
$sel:maxItems:ListHostedZonesByVPC' :: ListHostedZonesByVPC -> Maybe Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"maxitems" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
maxItems,
        ByteString
"nexttoken" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Maybe Text
nextToken,
        ByteString
"vpcid" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: Text
vPCId,
        ByteString
"vpcregion" forall a. ToQuery a => ByteString -> a -> QueryString
Data.=: VPCRegion
vPCRegion
      ]

-- | /See:/ 'newListHostedZonesByVPCResponse' smart constructor.
data ListHostedZonesByVPCResponse = ListHostedZonesByVPCResponse'
  { -- | The value that you will use for @NextToken@ in the next
    -- @ListHostedZonesByVPC@ request.
    ListHostedZonesByVPCResponse -> Maybe Text
nextToken :: Prelude.Maybe Prelude.Text,
    -- | The response's http status code.
    ListHostedZonesByVPCResponse -> Int
httpStatus :: Prelude.Int,
    -- | A list that contains one @HostedZoneSummary@ element for each hosted
    -- zone that the specified Amazon VPC is associated with. Each
    -- @HostedZoneSummary@ element contains the hosted zone name and ID, and
    -- information about who owns the hosted zone.
    ListHostedZonesByVPCResponse -> [HostedZoneSummary]
hostedZoneSummaries :: [HostedZoneSummary],
    -- | The value that you specified for @MaxItems@ in the most recent
    -- @ListHostedZonesByVPC@ request.
    ListHostedZonesByVPCResponse -> Text
maxItems :: Prelude.Text
  }
  deriving (ListHostedZonesByVPCResponse
-> ListHostedZonesByVPCResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ListHostedZonesByVPCResponse
-> ListHostedZonesByVPCResponse -> Bool
$c/= :: ListHostedZonesByVPCResponse
-> ListHostedZonesByVPCResponse -> Bool
== :: ListHostedZonesByVPCResponse
-> ListHostedZonesByVPCResponse -> Bool
$c== :: ListHostedZonesByVPCResponse
-> ListHostedZonesByVPCResponse -> Bool
Prelude.Eq, ReadPrec [ListHostedZonesByVPCResponse]
ReadPrec ListHostedZonesByVPCResponse
Int -> ReadS ListHostedZonesByVPCResponse
ReadS [ListHostedZonesByVPCResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [ListHostedZonesByVPCResponse]
$creadListPrec :: ReadPrec [ListHostedZonesByVPCResponse]
readPrec :: ReadPrec ListHostedZonesByVPCResponse
$creadPrec :: ReadPrec ListHostedZonesByVPCResponse
readList :: ReadS [ListHostedZonesByVPCResponse]
$creadList :: ReadS [ListHostedZonesByVPCResponse]
readsPrec :: Int -> ReadS ListHostedZonesByVPCResponse
$creadsPrec :: Int -> ReadS ListHostedZonesByVPCResponse
Prelude.Read, Int -> ListHostedZonesByVPCResponse -> ShowS
[ListHostedZonesByVPCResponse] -> ShowS
ListHostedZonesByVPCResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [ListHostedZonesByVPCResponse] -> ShowS
$cshowList :: [ListHostedZonesByVPCResponse] -> ShowS
show :: ListHostedZonesByVPCResponse -> String
$cshow :: ListHostedZonesByVPCResponse -> String
showsPrec :: Int -> ListHostedZonesByVPCResponse -> ShowS
$cshowsPrec :: Int -> ListHostedZonesByVPCResponse -> ShowS
Prelude.Show, forall x.
Rep ListHostedZonesByVPCResponse x -> ListHostedZonesByVPCResponse
forall x.
ListHostedZonesByVPCResponse -> Rep ListHostedZonesByVPCResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep ListHostedZonesByVPCResponse x -> ListHostedZonesByVPCResponse
$cfrom :: forall x.
ListHostedZonesByVPCResponse -> Rep ListHostedZonesByVPCResponse x
Prelude.Generic)

-- |
-- Create a value of 'ListHostedZonesByVPCResponse' 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:
--
-- 'nextToken', 'listHostedZonesByVPCResponse_nextToken' - The value that you will use for @NextToken@ in the next
-- @ListHostedZonesByVPC@ request.
--
-- 'httpStatus', 'listHostedZonesByVPCResponse_httpStatus' - The response's http status code.
--
-- 'hostedZoneSummaries', 'listHostedZonesByVPCResponse_hostedZoneSummaries' - A list that contains one @HostedZoneSummary@ element for each hosted
-- zone that the specified Amazon VPC is associated with. Each
-- @HostedZoneSummary@ element contains the hosted zone name and ID, and
-- information about who owns the hosted zone.
--
-- 'maxItems', 'listHostedZonesByVPCResponse_maxItems' - The value that you specified for @MaxItems@ in the most recent
-- @ListHostedZonesByVPC@ request.
newListHostedZonesByVPCResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'maxItems'
  Prelude.Text ->
  ListHostedZonesByVPCResponse
newListHostedZonesByVPCResponse :: Int -> Text -> ListHostedZonesByVPCResponse
newListHostedZonesByVPCResponse
  Int
pHttpStatus_
  Text
pMaxItems_ =
    ListHostedZonesByVPCResponse'
      { $sel:nextToken:ListHostedZonesByVPCResponse' :: Maybe Text
nextToken =
          forall a. Maybe a
Prelude.Nothing,
        $sel:httpStatus:ListHostedZonesByVPCResponse' :: Int
httpStatus = Int
pHttpStatus_,
        $sel:hostedZoneSummaries:ListHostedZonesByVPCResponse' :: [HostedZoneSummary]
hostedZoneSummaries = forall a. Monoid a => a
Prelude.mempty,
        $sel:maxItems:ListHostedZonesByVPCResponse' :: Text
maxItems = Text
pMaxItems_
      }

-- | The value that you will use for @NextToken@ in the next
-- @ListHostedZonesByVPC@ request.
listHostedZonesByVPCResponse_nextToken :: Lens.Lens' ListHostedZonesByVPCResponse (Prelude.Maybe Prelude.Text)
listHostedZonesByVPCResponse_nextToken :: Lens' ListHostedZonesByVPCResponse (Maybe Text)
listHostedZonesByVPCResponse_nextToken = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPCResponse' {Maybe Text
nextToken :: Maybe Text
$sel:nextToken:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> Maybe Text
nextToken} -> Maybe Text
nextToken) (\s :: ListHostedZonesByVPCResponse
s@ListHostedZonesByVPCResponse' {} Maybe Text
a -> ListHostedZonesByVPCResponse
s {$sel:nextToken:ListHostedZonesByVPCResponse' :: Maybe Text
nextToken = Maybe Text
a} :: ListHostedZonesByVPCResponse)

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

-- | A list that contains one @HostedZoneSummary@ element for each hosted
-- zone that the specified Amazon VPC is associated with. Each
-- @HostedZoneSummary@ element contains the hosted zone name and ID, and
-- information about who owns the hosted zone.
listHostedZonesByVPCResponse_hostedZoneSummaries :: Lens.Lens' ListHostedZonesByVPCResponse [HostedZoneSummary]
listHostedZonesByVPCResponse_hostedZoneSummaries :: Lens' ListHostedZonesByVPCResponse [HostedZoneSummary]
listHostedZonesByVPCResponse_hostedZoneSummaries = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPCResponse' {[HostedZoneSummary]
hostedZoneSummaries :: [HostedZoneSummary]
$sel:hostedZoneSummaries:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> [HostedZoneSummary]
hostedZoneSummaries} -> [HostedZoneSummary]
hostedZoneSummaries) (\s :: ListHostedZonesByVPCResponse
s@ListHostedZonesByVPCResponse' {} [HostedZoneSummary]
a -> ListHostedZonesByVPCResponse
s {$sel:hostedZoneSummaries:ListHostedZonesByVPCResponse' :: [HostedZoneSummary]
hostedZoneSummaries = [HostedZoneSummary]
a} :: ListHostedZonesByVPCResponse) 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

-- | The value that you specified for @MaxItems@ in the most recent
-- @ListHostedZonesByVPC@ request.
listHostedZonesByVPCResponse_maxItems :: Lens.Lens' ListHostedZonesByVPCResponse Prelude.Text
listHostedZonesByVPCResponse_maxItems :: Lens' ListHostedZonesByVPCResponse Text
listHostedZonesByVPCResponse_maxItems = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\ListHostedZonesByVPCResponse' {Text
maxItems :: Text
$sel:maxItems:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> Text
maxItems} -> Text
maxItems) (\s :: ListHostedZonesByVPCResponse
s@ListHostedZonesByVPCResponse' {} Text
a -> ListHostedZonesByVPCResponse
s {$sel:maxItems:ListHostedZonesByVPCResponse' :: Text
maxItems = Text
a} :: ListHostedZonesByVPCResponse)

instance Prelude.NFData ListHostedZonesByVPCResponse where
  rnf :: ListHostedZonesByVPCResponse -> ()
rnf ListHostedZonesByVPCResponse' {Int
[HostedZoneSummary]
Maybe Text
Text
maxItems :: Text
hostedZoneSummaries :: [HostedZoneSummary]
httpStatus :: Int
nextToken :: Maybe Text
$sel:maxItems:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> Text
$sel:hostedZoneSummaries:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> [HostedZoneSummary]
$sel:httpStatus:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> Int
$sel:nextToken:ListHostedZonesByVPCResponse' :: ListHostedZonesByVPCResponse -> Maybe Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
nextToken
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Int
httpStatus
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf [HostedZoneSummary]
hostedZoneSummaries
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
maxItems