{-# 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.CreateVPCAssociationAuthorization
-- 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)
--
-- Authorizes the Amazon Web Services account that created a specified VPC
-- to submit an @AssociateVPCWithHostedZone@ request to associate the VPC
-- with a specified hosted zone that was created by a different account. To
-- submit a @CreateVPCAssociationAuthorization@ request, you must use the
-- account that created the hosted zone. After you authorize the
-- association, use the account that created the VPC to submit an
-- @AssociateVPCWithHostedZone@ request.
--
-- If you want to associate multiple VPCs that you created by using one
-- account with a hosted zone that you created by using a different
-- account, you must submit one authorization request for each VPC.
module Amazonka.Route53.CreateVPCAssociationAuthorization
  ( -- * Creating a Request
    CreateVPCAssociationAuthorization (..),
    newCreateVPCAssociationAuthorization,

    -- * Request Lenses
    createVPCAssociationAuthorization_hostedZoneId,
    createVPCAssociationAuthorization_vpc,

    -- * Destructuring the Response
    CreateVPCAssociationAuthorizationResponse (..),
    newCreateVPCAssociationAuthorizationResponse,

    -- * Response Lenses
    createVPCAssociationAuthorizationResponse_httpStatus,
    createVPCAssociationAuthorizationResponse_hostedZoneId,
    createVPCAssociationAuthorizationResponse_vpc,
  )
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 information about the request to authorize
-- associating a VPC with your private hosted zone. Authorization is only
-- required when a private hosted zone and a VPC were created by using
-- different accounts.
--
-- /See:/ 'newCreateVPCAssociationAuthorization' smart constructor.
data CreateVPCAssociationAuthorization = CreateVPCAssociationAuthorization'
  { -- | The ID of the private hosted zone that you want to authorize associating
    -- a VPC with.
    CreateVPCAssociationAuthorization -> ResourceId
hostedZoneId :: ResourceId,
    -- | A complex type that contains the VPC ID and region for the VPC that you
    -- want to authorize associating with your hosted zone.
    CreateVPCAssociationAuthorization -> VPC
vpc :: VPC
  }
  deriving (CreateVPCAssociationAuthorization
-> CreateVPCAssociationAuthorization -> Bool
(CreateVPCAssociationAuthorization
 -> CreateVPCAssociationAuthorization -> Bool)
-> (CreateVPCAssociationAuthorization
    -> CreateVPCAssociationAuthorization -> Bool)
-> Eq CreateVPCAssociationAuthorization
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVPCAssociationAuthorization
-> CreateVPCAssociationAuthorization -> Bool
$c/= :: CreateVPCAssociationAuthorization
-> CreateVPCAssociationAuthorization -> Bool
== :: CreateVPCAssociationAuthorization
-> CreateVPCAssociationAuthorization -> Bool
$c== :: CreateVPCAssociationAuthorization
-> CreateVPCAssociationAuthorization -> Bool
Prelude.Eq, ReadPrec [CreateVPCAssociationAuthorization]
ReadPrec CreateVPCAssociationAuthorization
Int -> ReadS CreateVPCAssociationAuthorization
ReadS [CreateVPCAssociationAuthorization]
(Int -> ReadS CreateVPCAssociationAuthorization)
-> ReadS [CreateVPCAssociationAuthorization]
-> ReadPrec CreateVPCAssociationAuthorization
-> ReadPrec [CreateVPCAssociationAuthorization]
-> Read CreateVPCAssociationAuthorization
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVPCAssociationAuthorization]
$creadListPrec :: ReadPrec [CreateVPCAssociationAuthorization]
readPrec :: ReadPrec CreateVPCAssociationAuthorization
$creadPrec :: ReadPrec CreateVPCAssociationAuthorization
readList :: ReadS [CreateVPCAssociationAuthorization]
$creadList :: ReadS [CreateVPCAssociationAuthorization]
readsPrec :: Int -> ReadS CreateVPCAssociationAuthorization
$creadsPrec :: Int -> ReadS CreateVPCAssociationAuthorization
Prelude.Read, Int -> CreateVPCAssociationAuthorization -> ShowS
[CreateVPCAssociationAuthorization] -> ShowS
CreateVPCAssociationAuthorization -> String
(Int -> CreateVPCAssociationAuthorization -> ShowS)
-> (CreateVPCAssociationAuthorization -> String)
-> ([CreateVPCAssociationAuthorization] -> ShowS)
-> Show CreateVPCAssociationAuthorization
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVPCAssociationAuthorization] -> ShowS
$cshowList :: [CreateVPCAssociationAuthorization] -> ShowS
show :: CreateVPCAssociationAuthorization -> String
$cshow :: CreateVPCAssociationAuthorization -> String
showsPrec :: Int -> CreateVPCAssociationAuthorization -> ShowS
$cshowsPrec :: Int -> CreateVPCAssociationAuthorization -> ShowS
Prelude.Show, (forall x.
 CreateVPCAssociationAuthorization
 -> Rep CreateVPCAssociationAuthorization x)
-> (forall x.
    Rep CreateVPCAssociationAuthorization x
    -> CreateVPCAssociationAuthorization)
-> Generic CreateVPCAssociationAuthorization
forall x.
Rep CreateVPCAssociationAuthorization x
-> CreateVPCAssociationAuthorization
forall x.
CreateVPCAssociationAuthorization
-> Rep CreateVPCAssociationAuthorization x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVPCAssociationAuthorization x
-> CreateVPCAssociationAuthorization
$cfrom :: forall x.
CreateVPCAssociationAuthorization
-> Rep CreateVPCAssociationAuthorization x
Prelude.Generic)

-- |
-- Create a value of 'CreateVPCAssociationAuthorization' 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:
--
-- 'hostedZoneId', 'createVPCAssociationAuthorization_hostedZoneId' - The ID of the private hosted zone that you want to authorize associating
-- a VPC with.
--
-- 'vpc', 'createVPCAssociationAuthorization_vpc' - A complex type that contains the VPC ID and region for the VPC that you
-- want to authorize associating with your hosted zone.
newCreateVPCAssociationAuthorization ::
  -- | 'hostedZoneId'
  ResourceId ->
  -- | 'vpc'
  VPC ->
  CreateVPCAssociationAuthorization
newCreateVPCAssociationAuthorization :: ResourceId -> VPC -> CreateVPCAssociationAuthorization
newCreateVPCAssociationAuthorization
  ResourceId
pHostedZoneId_
  VPC
pVPC_ =
    CreateVPCAssociationAuthorization' :: ResourceId -> VPC -> CreateVPCAssociationAuthorization
CreateVPCAssociationAuthorization'
      { $sel:hostedZoneId:CreateVPCAssociationAuthorization' :: ResourceId
hostedZoneId =
          ResourceId
pHostedZoneId_,
        $sel:vpc:CreateVPCAssociationAuthorization' :: VPC
vpc = VPC
pVPC_
      }

-- | The ID of the private hosted zone that you want to authorize associating
-- a VPC with.
createVPCAssociationAuthorization_hostedZoneId :: Lens.Lens' CreateVPCAssociationAuthorization ResourceId
createVPCAssociationAuthorization_hostedZoneId :: (ResourceId -> f ResourceId)
-> CreateVPCAssociationAuthorization
-> f CreateVPCAssociationAuthorization
createVPCAssociationAuthorization_hostedZoneId = (CreateVPCAssociationAuthorization -> ResourceId)
-> (CreateVPCAssociationAuthorization
    -> ResourceId -> CreateVPCAssociationAuthorization)
-> Lens
     CreateVPCAssociationAuthorization
     CreateVPCAssociationAuthorization
     ResourceId
     ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVPCAssociationAuthorization' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: CreateVPCAssociationAuthorization
s@CreateVPCAssociationAuthorization' {} ResourceId
a -> CreateVPCAssociationAuthorization
s {$sel:hostedZoneId:CreateVPCAssociationAuthorization' :: ResourceId
hostedZoneId = ResourceId
a} :: CreateVPCAssociationAuthorization)

-- | A complex type that contains the VPC ID and region for the VPC that you
-- want to authorize associating with your hosted zone.
createVPCAssociationAuthorization_vpc :: Lens.Lens' CreateVPCAssociationAuthorization VPC
createVPCAssociationAuthorization_vpc :: (VPC -> f VPC)
-> CreateVPCAssociationAuthorization
-> f CreateVPCAssociationAuthorization
createVPCAssociationAuthorization_vpc = (CreateVPCAssociationAuthorization -> VPC)
-> (CreateVPCAssociationAuthorization
    -> VPC -> CreateVPCAssociationAuthorization)
-> Lens
     CreateVPCAssociationAuthorization
     CreateVPCAssociationAuthorization
     VPC
     VPC
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVPCAssociationAuthorization' {VPC
vpc :: VPC
$sel:vpc:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> VPC
vpc} -> VPC
vpc) (\s :: CreateVPCAssociationAuthorization
s@CreateVPCAssociationAuthorization' {} VPC
a -> CreateVPCAssociationAuthorization
s {$sel:vpc:CreateVPCAssociationAuthorization' :: VPC
vpc = VPC
a} :: CreateVPCAssociationAuthorization)

instance
  Core.AWSRequest
    CreateVPCAssociationAuthorization
  where
  type
    AWSResponse CreateVPCAssociationAuthorization =
      CreateVPCAssociationAuthorizationResponse
  request :: CreateVPCAssociationAuthorization
-> Request CreateVPCAssociationAuthorization
request = Service
-> CreateVPCAssociationAuthorization
-> Request CreateVPCAssociationAuthorization
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
  response :: Logger
-> Service
-> Proxy CreateVPCAssociationAuthorization
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreateVPCAssociationAuthorization)))
response =
    (Int
 -> ResponseHeaders
 -> [Node]
 -> Either String (AWSResponse CreateVPCAssociationAuthorization))
-> Logger
-> Service
-> Proxy CreateVPCAssociationAuthorization
-> ClientResponse ClientBody
-> m (Either
        Error
        (ClientResponse (AWSResponse CreateVPCAssociationAuthorization)))
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 ->
          Int
-> ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse
CreateVPCAssociationAuthorizationResponse'
            (Int
 -> ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse)
-> Either String Int
-> Either
     String
     (ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse)
forall (f :: * -> *) a b. Functor 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
  (ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse)
-> Either String ResourceId
-> Either String (VPC -> CreateVPCAssociationAuthorizationResponse)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String ResourceId
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"HostedZoneId")
              Either String (VPC -> CreateVPCAssociationAuthorizationResponse)
-> Either String VPC
-> Either String CreateVPCAssociationAuthorizationResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String VPC
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"VPC")
      )

instance
  Prelude.Hashable
    CreateVPCAssociationAuthorization

instance
  Prelude.NFData
    CreateVPCAssociationAuthorization

instance
  Core.ToElement
    CreateVPCAssociationAuthorization
  where
  toElement :: CreateVPCAssociationAuthorization -> Element
toElement =
    Name -> CreateVPCAssociationAuthorization -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
      Name
"{https://route53.amazonaws.com/doc/2013-04-01/}CreateVPCAssociationAuthorizationRequest"

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

instance
  Core.ToPath
    CreateVPCAssociationAuthorization
  where
  toPath :: CreateVPCAssociationAuthorization -> ByteString
toPath CreateVPCAssociationAuthorization' {ResourceId
VPC
vpc :: VPC
hostedZoneId :: ResourceId
$sel:vpc:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> VPC
$sel:hostedZoneId:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> ResourceId
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/2013-04-01/hostedzone/",
        ResourceId -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS ResourceId
hostedZoneId,
        ByteString
"/authorizevpcassociation"
      ]

instance
  Core.ToQuery
    CreateVPCAssociationAuthorization
  where
  toQuery :: CreateVPCAssociationAuthorization -> QueryString
toQuery = QueryString -> CreateVPCAssociationAuthorization -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty

instance Core.ToXML CreateVPCAssociationAuthorization where
  toXML :: CreateVPCAssociationAuthorization -> XML
toXML CreateVPCAssociationAuthorization' {ResourceId
VPC
vpc :: VPC
hostedZoneId :: ResourceId
$sel:vpc:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> VPC
$sel:hostedZoneId:CreateVPCAssociationAuthorization' :: CreateVPCAssociationAuthorization -> ResourceId
..} =
    [XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"VPC" Name -> VPC -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= VPC
vpc]

-- | A complex type that contains the response information from a
-- @CreateVPCAssociationAuthorization@ request.
--
-- /See:/ 'newCreateVPCAssociationAuthorizationResponse' smart constructor.
data CreateVPCAssociationAuthorizationResponse = CreateVPCAssociationAuthorizationResponse'
  { -- | The response's http status code.
    CreateVPCAssociationAuthorizationResponse -> Int
httpStatus :: Prelude.Int,
    -- | The ID of the hosted zone that you authorized associating a VPC with.
    CreateVPCAssociationAuthorizationResponse -> ResourceId
hostedZoneId :: ResourceId,
    -- | The VPC that you authorized associating with a hosted zone.
    CreateVPCAssociationAuthorizationResponse -> VPC
vpc :: VPC
  }
  deriving (CreateVPCAssociationAuthorizationResponse
-> CreateVPCAssociationAuthorizationResponse -> Bool
(CreateVPCAssociationAuthorizationResponse
 -> CreateVPCAssociationAuthorizationResponse -> Bool)
-> (CreateVPCAssociationAuthorizationResponse
    -> CreateVPCAssociationAuthorizationResponse -> Bool)
-> Eq CreateVPCAssociationAuthorizationResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: CreateVPCAssociationAuthorizationResponse
-> CreateVPCAssociationAuthorizationResponse -> Bool
$c/= :: CreateVPCAssociationAuthorizationResponse
-> CreateVPCAssociationAuthorizationResponse -> Bool
== :: CreateVPCAssociationAuthorizationResponse
-> CreateVPCAssociationAuthorizationResponse -> Bool
$c== :: CreateVPCAssociationAuthorizationResponse
-> CreateVPCAssociationAuthorizationResponse -> Bool
Prelude.Eq, ReadPrec [CreateVPCAssociationAuthorizationResponse]
ReadPrec CreateVPCAssociationAuthorizationResponse
Int -> ReadS CreateVPCAssociationAuthorizationResponse
ReadS [CreateVPCAssociationAuthorizationResponse]
(Int -> ReadS CreateVPCAssociationAuthorizationResponse)
-> ReadS [CreateVPCAssociationAuthorizationResponse]
-> ReadPrec CreateVPCAssociationAuthorizationResponse
-> ReadPrec [CreateVPCAssociationAuthorizationResponse]
-> Read CreateVPCAssociationAuthorizationResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [CreateVPCAssociationAuthorizationResponse]
$creadListPrec :: ReadPrec [CreateVPCAssociationAuthorizationResponse]
readPrec :: ReadPrec CreateVPCAssociationAuthorizationResponse
$creadPrec :: ReadPrec CreateVPCAssociationAuthorizationResponse
readList :: ReadS [CreateVPCAssociationAuthorizationResponse]
$creadList :: ReadS [CreateVPCAssociationAuthorizationResponse]
readsPrec :: Int -> ReadS CreateVPCAssociationAuthorizationResponse
$creadsPrec :: Int -> ReadS CreateVPCAssociationAuthorizationResponse
Prelude.Read, Int -> CreateVPCAssociationAuthorizationResponse -> ShowS
[CreateVPCAssociationAuthorizationResponse] -> ShowS
CreateVPCAssociationAuthorizationResponse -> String
(Int -> CreateVPCAssociationAuthorizationResponse -> ShowS)
-> (CreateVPCAssociationAuthorizationResponse -> String)
-> ([CreateVPCAssociationAuthorizationResponse] -> ShowS)
-> Show CreateVPCAssociationAuthorizationResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [CreateVPCAssociationAuthorizationResponse] -> ShowS
$cshowList :: [CreateVPCAssociationAuthorizationResponse] -> ShowS
show :: CreateVPCAssociationAuthorizationResponse -> String
$cshow :: CreateVPCAssociationAuthorizationResponse -> String
showsPrec :: Int -> CreateVPCAssociationAuthorizationResponse -> ShowS
$cshowsPrec :: Int -> CreateVPCAssociationAuthorizationResponse -> ShowS
Prelude.Show, (forall x.
 CreateVPCAssociationAuthorizationResponse
 -> Rep CreateVPCAssociationAuthorizationResponse x)
-> (forall x.
    Rep CreateVPCAssociationAuthorizationResponse x
    -> CreateVPCAssociationAuthorizationResponse)
-> Generic CreateVPCAssociationAuthorizationResponse
forall x.
Rep CreateVPCAssociationAuthorizationResponse x
-> CreateVPCAssociationAuthorizationResponse
forall x.
CreateVPCAssociationAuthorizationResponse
-> Rep CreateVPCAssociationAuthorizationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep CreateVPCAssociationAuthorizationResponse x
-> CreateVPCAssociationAuthorizationResponse
$cfrom :: forall x.
CreateVPCAssociationAuthorizationResponse
-> Rep CreateVPCAssociationAuthorizationResponse x
Prelude.Generic)

-- |
-- Create a value of 'CreateVPCAssociationAuthorizationResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'httpStatus', 'createVPCAssociationAuthorizationResponse_httpStatus' - The response's http status code.
--
-- 'hostedZoneId', 'createVPCAssociationAuthorizationResponse_hostedZoneId' - The ID of the hosted zone that you authorized associating a VPC with.
--
-- 'vpc', 'createVPCAssociationAuthorizationResponse_vpc' - The VPC that you authorized associating with a hosted zone.
newCreateVPCAssociationAuthorizationResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'hostedZoneId'
  ResourceId ->
  -- | 'vpc'
  VPC ->
  CreateVPCAssociationAuthorizationResponse
newCreateVPCAssociationAuthorizationResponse :: Int
-> ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse
newCreateVPCAssociationAuthorizationResponse
  Int
pHttpStatus_
  ResourceId
pHostedZoneId_
  VPC
pVPC_ =
    CreateVPCAssociationAuthorizationResponse' :: Int
-> ResourceId -> VPC -> CreateVPCAssociationAuthorizationResponse
CreateVPCAssociationAuthorizationResponse'
      { $sel:httpStatus:CreateVPCAssociationAuthorizationResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:hostedZoneId:CreateVPCAssociationAuthorizationResponse' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_,
        $sel:vpc:CreateVPCAssociationAuthorizationResponse' :: VPC
vpc = VPC
pVPC_
      }

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

-- | The ID of the hosted zone that you authorized associating a VPC with.
createVPCAssociationAuthorizationResponse_hostedZoneId :: Lens.Lens' CreateVPCAssociationAuthorizationResponse ResourceId
createVPCAssociationAuthorizationResponse_hostedZoneId :: (ResourceId -> f ResourceId)
-> CreateVPCAssociationAuthorizationResponse
-> f CreateVPCAssociationAuthorizationResponse
createVPCAssociationAuthorizationResponse_hostedZoneId = (CreateVPCAssociationAuthorizationResponse -> ResourceId)
-> (CreateVPCAssociationAuthorizationResponse
    -> ResourceId -> CreateVPCAssociationAuthorizationResponse)
-> Lens
     CreateVPCAssociationAuthorizationResponse
     CreateVPCAssociationAuthorizationResponse
     ResourceId
     ResourceId
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVPCAssociationAuthorizationResponse' {ResourceId
hostedZoneId :: ResourceId
$sel:hostedZoneId:CreateVPCAssociationAuthorizationResponse' :: CreateVPCAssociationAuthorizationResponse -> ResourceId
hostedZoneId} -> ResourceId
hostedZoneId) (\s :: CreateVPCAssociationAuthorizationResponse
s@CreateVPCAssociationAuthorizationResponse' {} ResourceId
a -> CreateVPCAssociationAuthorizationResponse
s {$sel:hostedZoneId:CreateVPCAssociationAuthorizationResponse' :: ResourceId
hostedZoneId = ResourceId
a} :: CreateVPCAssociationAuthorizationResponse)

-- | The VPC that you authorized associating with a hosted zone.
createVPCAssociationAuthorizationResponse_vpc :: Lens.Lens' CreateVPCAssociationAuthorizationResponse VPC
createVPCAssociationAuthorizationResponse_vpc :: (VPC -> f VPC)
-> CreateVPCAssociationAuthorizationResponse
-> f CreateVPCAssociationAuthorizationResponse
createVPCAssociationAuthorizationResponse_vpc = (CreateVPCAssociationAuthorizationResponse -> VPC)
-> (CreateVPCAssociationAuthorizationResponse
    -> VPC -> CreateVPCAssociationAuthorizationResponse)
-> Lens
     CreateVPCAssociationAuthorizationResponse
     CreateVPCAssociationAuthorizationResponse
     VPC
     VPC
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\CreateVPCAssociationAuthorizationResponse' {VPC
vpc :: VPC
$sel:vpc:CreateVPCAssociationAuthorizationResponse' :: CreateVPCAssociationAuthorizationResponse -> VPC
vpc} -> VPC
vpc) (\s :: CreateVPCAssociationAuthorizationResponse
s@CreateVPCAssociationAuthorizationResponse' {} VPC
a -> CreateVPCAssociationAuthorizationResponse
s {$sel:vpc:CreateVPCAssociationAuthorizationResponse' :: VPC
vpc = VPC
a} :: CreateVPCAssociationAuthorizationResponse)

instance
  Prelude.NFData
    CreateVPCAssociationAuthorizationResponse