{-# 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.DisassociateVPCFromHostedZone
-- 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)
--
-- Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an
-- Amazon Route 53 private hosted zone. Note the following:
--
-- -   You can\'t disassociate the last Amazon VPC from a private hosted
--     zone.
--
-- -   You can\'t convert a private hosted zone into a public hosted zone.
--
-- -   You can submit a @DisassociateVPCFromHostedZone@ request using
--     either the account that created the hosted zone or the account that
--     created the Amazon VPC.
--
-- -   Some services, such as Cloud Map and Amazon Elastic File System
--     (Amazon EFS) automatically create hosted zones and associate VPCs
--     with the hosted zones. A service can create a hosted zone using your
--     account or using its own account. You can disassociate a VPC from a
--     hosted zone only if the service created the hosted zone using your
--     account.
--
--     When you run
--     <https://docs.aws.amazon.com/Route53/latest/APIReference/API_ListHostedZonesByVPC.html DisassociateVPCFromHostedZone>,
--     if the hosted zone has a value for @OwningAccount@, you can use
--     @DisassociateVPCFromHostedZone@. If the hosted zone has a value for
--     @OwningService@, you can\'t use @DisassociateVPCFromHostedZone@.
module Amazonka.Route53.DisassociateVPCFromHostedZone
  ( -- * Creating a Request
    DisassociateVPCFromHostedZone (..),
    newDisassociateVPCFromHostedZone,

    -- * Request Lenses
    disassociateVPCFromHostedZone_comment,
    disassociateVPCFromHostedZone_hostedZoneId,
    disassociateVPCFromHostedZone_vpc,

    -- * Destructuring the Response
    DisassociateVPCFromHostedZoneResponse (..),
    newDisassociateVPCFromHostedZoneResponse,

    -- * Response Lenses
    disassociateVPCFromHostedZoneResponse_httpStatus,
    disassociateVPCFromHostedZoneResponse_changeInfo,
  )
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 VPC that you want to
-- disassociate from a specified private hosted zone.
--
-- /See:/ 'newDisassociateVPCFromHostedZone' smart constructor.
data DisassociateVPCFromHostedZone = DisassociateVPCFromHostedZone'
  { -- | /Optional:/ A comment about the disassociation request.
    DisassociateVPCFromHostedZone -> Maybe Text
comment :: Prelude.Maybe Prelude.Text,
    -- | The ID of the private hosted zone that you want to disassociate a VPC
    -- from.
    DisassociateVPCFromHostedZone -> ResourceId
hostedZoneId :: ResourceId,
    -- | A complex type that contains information about the VPC that you\'re
    -- disassociating from the specified hosted zone.
    DisassociateVPCFromHostedZone -> VPC
vpc :: VPC
  }
  deriving (DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
(DisassociateVPCFromHostedZone
 -> DisassociateVPCFromHostedZone -> Bool)
-> (DisassociateVPCFromHostedZone
    -> DisassociateVPCFromHostedZone -> Bool)
-> Eq DisassociateVPCFromHostedZone
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
$c/= :: DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
== :: DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
$c== :: DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
Prelude.Eq, ReadPrec [DisassociateVPCFromHostedZone]
ReadPrec DisassociateVPCFromHostedZone
Int -> ReadS DisassociateVPCFromHostedZone
ReadS [DisassociateVPCFromHostedZone]
(Int -> ReadS DisassociateVPCFromHostedZone)
-> ReadS [DisassociateVPCFromHostedZone]
-> ReadPrec DisassociateVPCFromHostedZone
-> ReadPrec [DisassociateVPCFromHostedZone]
-> Read DisassociateVPCFromHostedZone
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateVPCFromHostedZone]
$creadListPrec :: ReadPrec [DisassociateVPCFromHostedZone]
readPrec :: ReadPrec DisassociateVPCFromHostedZone
$creadPrec :: ReadPrec DisassociateVPCFromHostedZone
readList :: ReadS [DisassociateVPCFromHostedZone]
$creadList :: ReadS [DisassociateVPCFromHostedZone]
readsPrec :: Int -> ReadS DisassociateVPCFromHostedZone
$creadsPrec :: Int -> ReadS DisassociateVPCFromHostedZone
Prelude.Read, Int -> DisassociateVPCFromHostedZone -> ShowS
[DisassociateVPCFromHostedZone] -> ShowS
DisassociateVPCFromHostedZone -> String
(Int -> DisassociateVPCFromHostedZone -> ShowS)
-> (DisassociateVPCFromHostedZone -> String)
-> ([DisassociateVPCFromHostedZone] -> ShowS)
-> Show DisassociateVPCFromHostedZone
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateVPCFromHostedZone] -> ShowS
$cshowList :: [DisassociateVPCFromHostedZone] -> ShowS
show :: DisassociateVPCFromHostedZone -> String
$cshow :: DisassociateVPCFromHostedZone -> String
showsPrec :: Int -> DisassociateVPCFromHostedZone -> ShowS
$cshowsPrec :: Int -> DisassociateVPCFromHostedZone -> ShowS
Prelude.Show, (forall x.
 DisassociateVPCFromHostedZone
 -> Rep DisassociateVPCFromHostedZone x)
-> (forall x.
    Rep DisassociateVPCFromHostedZone x
    -> DisassociateVPCFromHostedZone)
-> Generic DisassociateVPCFromHostedZone
forall x.
Rep DisassociateVPCFromHostedZone x
-> DisassociateVPCFromHostedZone
forall x.
DisassociateVPCFromHostedZone
-> Rep DisassociateVPCFromHostedZone x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateVPCFromHostedZone x
-> DisassociateVPCFromHostedZone
$cfrom :: forall x.
DisassociateVPCFromHostedZone
-> Rep DisassociateVPCFromHostedZone x
Prelude.Generic)

-- |
-- Create a value of 'DisassociateVPCFromHostedZone' 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:
--
-- 'comment', 'disassociateVPCFromHostedZone_comment' - /Optional:/ A comment about the disassociation request.
--
-- 'hostedZoneId', 'disassociateVPCFromHostedZone_hostedZoneId' - The ID of the private hosted zone that you want to disassociate a VPC
-- from.
--
-- 'vpc', 'disassociateVPCFromHostedZone_vpc' - A complex type that contains information about the VPC that you\'re
-- disassociating from the specified hosted zone.
newDisassociateVPCFromHostedZone ::
  -- | 'hostedZoneId'
  ResourceId ->
  -- | 'vpc'
  VPC ->
  DisassociateVPCFromHostedZone
newDisassociateVPCFromHostedZone :: ResourceId -> VPC -> DisassociateVPCFromHostedZone
newDisassociateVPCFromHostedZone ResourceId
pHostedZoneId_ VPC
pVPC_ =
  DisassociateVPCFromHostedZone' :: Maybe Text -> ResourceId -> VPC -> DisassociateVPCFromHostedZone
DisassociateVPCFromHostedZone'
    { $sel:comment:DisassociateVPCFromHostedZone' :: Maybe Text
comment =
        Maybe Text
forall a. Maybe a
Prelude.Nothing,
      $sel:hostedZoneId:DisassociateVPCFromHostedZone' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_,
      $sel:vpc:DisassociateVPCFromHostedZone' :: VPC
vpc = VPC
pVPC_
    }

-- | /Optional:/ A comment about the disassociation request.
disassociateVPCFromHostedZone_comment :: Lens.Lens' DisassociateVPCFromHostedZone (Prelude.Maybe Prelude.Text)
disassociateVPCFromHostedZone_comment :: (Maybe Text -> f (Maybe Text))
-> DisassociateVPCFromHostedZone -> f DisassociateVPCFromHostedZone
disassociateVPCFromHostedZone_comment = (DisassociateVPCFromHostedZone -> Maybe Text)
-> (DisassociateVPCFromHostedZone
    -> Maybe Text -> DisassociateVPCFromHostedZone)
-> Lens
     DisassociateVPCFromHostedZone
     DisassociateVPCFromHostedZone
     (Maybe Text)
     (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateVPCFromHostedZone' {Maybe Text
comment :: Maybe Text
$sel:comment:DisassociateVPCFromHostedZone' :: DisassociateVPCFromHostedZone -> Maybe Text
comment} -> Maybe Text
comment) (\s :: DisassociateVPCFromHostedZone
s@DisassociateVPCFromHostedZone' {} Maybe Text
a -> DisassociateVPCFromHostedZone
s {$sel:comment:DisassociateVPCFromHostedZone' :: Maybe Text
comment = Maybe Text
a} :: DisassociateVPCFromHostedZone)

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

-- | A complex type that contains information about the VPC that you\'re
-- disassociating from the specified hosted zone.
disassociateVPCFromHostedZone_vpc :: Lens.Lens' DisassociateVPCFromHostedZone VPC
disassociateVPCFromHostedZone_vpc :: (VPC -> f VPC)
-> DisassociateVPCFromHostedZone -> f DisassociateVPCFromHostedZone
disassociateVPCFromHostedZone_vpc = (DisassociateVPCFromHostedZone -> VPC)
-> (DisassociateVPCFromHostedZone
    -> VPC -> DisassociateVPCFromHostedZone)
-> Lens
     DisassociateVPCFromHostedZone DisassociateVPCFromHostedZone VPC VPC
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateVPCFromHostedZone' {VPC
vpc :: VPC
$sel:vpc:DisassociateVPCFromHostedZone' :: DisassociateVPCFromHostedZone -> VPC
vpc} -> VPC
vpc) (\s :: DisassociateVPCFromHostedZone
s@DisassociateVPCFromHostedZone' {} VPC
a -> DisassociateVPCFromHostedZone
s {$sel:vpc:DisassociateVPCFromHostedZone' :: VPC
vpc = VPC
a} :: DisassociateVPCFromHostedZone)

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

instance
  Prelude.Hashable
    DisassociateVPCFromHostedZone

instance Prelude.NFData DisassociateVPCFromHostedZone

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

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

instance Core.ToPath DisassociateVPCFromHostedZone where
  toPath :: DisassociateVPCFromHostedZone -> ByteString
toPath DisassociateVPCFromHostedZone' {Maybe Text
ResourceId
VPC
vpc :: VPC
hostedZoneId :: ResourceId
comment :: Maybe Text
$sel:vpc:DisassociateVPCFromHostedZone' :: DisassociateVPCFromHostedZone -> VPC
$sel:hostedZoneId:DisassociateVPCFromHostedZone' :: DisassociateVPCFromHostedZone -> ResourceId
$sel:comment:DisassociateVPCFromHostedZone' :: DisassociateVPCFromHostedZone -> Maybe Text
..} =
    [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
"/disassociatevpc"
      ]

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

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

-- | A complex type that contains the response information for the
-- disassociate request.
--
-- /See:/ 'newDisassociateVPCFromHostedZoneResponse' smart constructor.
data DisassociateVPCFromHostedZoneResponse = DisassociateVPCFromHostedZoneResponse'
  { -- | The response's http status code.
    DisassociateVPCFromHostedZoneResponse -> Int
httpStatus :: Prelude.Int,
    -- | A complex type that describes the changes made to the specified private
    -- hosted zone.
    DisassociateVPCFromHostedZoneResponse -> ChangeInfo
changeInfo :: ChangeInfo
  }
  deriving (DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
(DisassociateVPCFromHostedZoneResponse
 -> DisassociateVPCFromHostedZoneResponse -> Bool)
-> (DisassociateVPCFromHostedZoneResponse
    -> DisassociateVPCFromHostedZoneResponse -> Bool)
-> Eq DisassociateVPCFromHostedZoneResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
$c/= :: DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
== :: DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
$c== :: DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
Prelude.Eq, ReadPrec [DisassociateVPCFromHostedZoneResponse]
ReadPrec DisassociateVPCFromHostedZoneResponse
Int -> ReadS DisassociateVPCFromHostedZoneResponse
ReadS [DisassociateVPCFromHostedZoneResponse]
(Int -> ReadS DisassociateVPCFromHostedZoneResponse)
-> ReadS [DisassociateVPCFromHostedZoneResponse]
-> ReadPrec DisassociateVPCFromHostedZoneResponse
-> ReadPrec [DisassociateVPCFromHostedZoneResponse]
-> Read DisassociateVPCFromHostedZoneResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DisassociateVPCFromHostedZoneResponse]
$creadListPrec :: ReadPrec [DisassociateVPCFromHostedZoneResponse]
readPrec :: ReadPrec DisassociateVPCFromHostedZoneResponse
$creadPrec :: ReadPrec DisassociateVPCFromHostedZoneResponse
readList :: ReadS [DisassociateVPCFromHostedZoneResponse]
$creadList :: ReadS [DisassociateVPCFromHostedZoneResponse]
readsPrec :: Int -> ReadS DisassociateVPCFromHostedZoneResponse
$creadsPrec :: Int -> ReadS DisassociateVPCFromHostedZoneResponse
Prelude.Read, Int -> DisassociateVPCFromHostedZoneResponse -> ShowS
[DisassociateVPCFromHostedZoneResponse] -> ShowS
DisassociateVPCFromHostedZoneResponse -> String
(Int -> DisassociateVPCFromHostedZoneResponse -> ShowS)
-> (DisassociateVPCFromHostedZoneResponse -> String)
-> ([DisassociateVPCFromHostedZoneResponse] -> ShowS)
-> Show DisassociateVPCFromHostedZoneResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DisassociateVPCFromHostedZoneResponse] -> ShowS
$cshowList :: [DisassociateVPCFromHostedZoneResponse] -> ShowS
show :: DisassociateVPCFromHostedZoneResponse -> String
$cshow :: DisassociateVPCFromHostedZoneResponse -> String
showsPrec :: Int -> DisassociateVPCFromHostedZoneResponse -> ShowS
$cshowsPrec :: Int -> DisassociateVPCFromHostedZoneResponse -> ShowS
Prelude.Show, (forall x.
 DisassociateVPCFromHostedZoneResponse
 -> Rep DisassociateVPCFromHostedZoneResponse x)
-> (forall x.
    Rep DisassociateVPCFromHostedZoneResponse x
    -> DisassociateVPCFromHostedZoneResponse)
-> Generic DisassociateVPCFromHostedZoneResponse
forall x.
Rep DisassociateVPCFromHostedZoneResponse x
-> DisassociateVPCFromHostedZoneResponse
forall x.
DisassociateVPCFromHostedZoneResponse
-> Rep DisassociateVPCFromHostedZoneResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DisassociateVPCFromHostedZoneResponse x
-> DisassociateVPCFromHostedZoneResponse
$cfrom :: forall x.
DisassociateVPCFromHostedZoneResponse
-> Rep DisassociateVPCFromHostedZoneResponse x
Prelude.Generic)

-- |
-- Create a value of 'DisassociateVPCFromHostedZoneResponse' 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', 'disassociateVPCFromHostedZoneResponse_httpStatus' - The response's http status code.
--
-- 'changeInfo', 'disassociateVPCFromHostedZoneResponse_changeInfo' - A complex type that describes the changes made to the specified private
-- hosted zone.
newDisassociateVPCFromHostedZoneResponse ::
  -- | 'httpStatus'
  Prelude.Int ->
  -- | 'changeInfo'
  ChangeInfo ->
  DisassociateVPCFromHostedZoneResponse
newDisassociateVPCFromHostedZoneResponse :: Int -> ChangeInfo -> DisassociateVPCFromHostedZoneResponse
newDisassociateVPCFromHostedZoneResponse
  Int
pHttpStatus_
  ChangeInfo
pChangeInfo_ =
    DisassociateVPCFromHostedZoneResponse' :: Int -> ChangeInfo -> DisassociateVPCFromHostedZoneResponse
DisassociateVPCFromHostedZoneResponse'
      { $sel:httpStatus:DisassociateVPCFromHostedZoneResponse' :: Int
httpStatus =
          Int
pHttpStatus_,
        $sel:changeInfo:DisassociateVPCFromHostedZoneResponse' :: ChangeInfo
changeInfo = ChangeInfo
pChangeInfo_
      }

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

-- | A complex type that describes the changes made to the specified private
-- hosted zone.
disassociateVPCFromHostedZoneResponse_changeInfo :: Lens.Lens' DisassociateVPCFromHostedZoneResponse ChangeInfo
disassociateVPCFromHostedZoneResponse_changeInfo :: (ChangeInfo -> f ChangeInfo)
-> DisassociateVPCFromHostedZoneResponse
-> f DisassociateVPCFromHostedZoneResponse
disassociateVPCFromHostedZoneResponse_changeInfo = (DisassociateVPCFromHostedZoneResponse -> ChangeInfo)
-> (DisassociateVPCFromHostedZoneResponse
    -> ChangeInfo -> DisassociateVPCFromHostedZoneResponse)
-> Lens
     DisassociateVPCFromHostedZoneResponse
     DisassociateVPCFromHostedZoneResponse
     ChangeInfo
     ChangeInfo
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DisassociateVPCFromHostedZoneResponse' {ChangeInfo
changeInfo :: ChangeInfo
$sel:changeInfo:DisassociateVPCFromHostedZoneResponse' :: DisassociateVPCFromHostedZoneResponse -> ChangeInfo
changeInfo} -> ChangeInfo
changeInfo) (\s :: DisassociateVPCFromHostedZoneResponse
s@DisassociateVPCFromHostedZoneResponse' {} ChangeInfo
a -> DisassociateVPCFromHostedZoneResponse
s {$sel:changeInfo:DisassociateVPCFromHostedZoneResponse' :: ChangeInfo
changeInfo = ChangeInfo
a} :: DisassociateVPCFromHostedZoneResponse)

instance
  Prelude.NFData
    DisassociateVPCFromHostedZoneResponse