{-# 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 #-}
module Amazonka.Route53.DisassociateVPCFromHostedZone
(
DisassociateVPCFromHostedZone (..),
newDisassociateVPCFromHostedZone,
disassociateVPCFromHostedZone_comment,
disassociateVPCFromHostedZone_hostedZoneId,
disassociateVPCFromHostedZone_vpc,
DisassociateVPCFromHostedZoneResponse (..),
newDisassociateVPCFromHostedZoneResponse,
disassociateVPCFromHostedZoneResponse_httpStatus,
disassociateVPCFromHostedZoneResponse_changeInfo,
)
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
data DisassociateVPCFromHostedZone = DisassociateVPCFromHostedZone'
{
:: Prelude.Maybe Prelude.Text,
DisassociateVPCFromHostedZone -> ResourceId
hostedZoneId :: ResourceId,
DisassociateVPCFromHostedZone -> VPC
vpc :: VPC
}
deriving (DisassociateVPCFromHostedZone
-> DisassociateVPCFromHostedZone -> Bool
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]
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
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.
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)
newDisassociateVPCFromHostedZone ::
ResourceId ->
VPC ->
DisassociateVPCFromHostedZone
newDisassociateVPCFromHostedZone :: ResourceId -> VPC -> DisassociateVPCFromHostedZone
newDisassociateVPCFromHostedZone ResourceId
pHostedZoneId_ VPC
pVPC_ =
DisassociateVPCFromHostedZone'
{ $sel:comment:DisassociateVPCFromHostedZone' :: Maybe Text
comment =
forall a. Maybe a
Prelude.Nothing,
$sel:hostedZoneId:DisassociateVPCFromHostedZone' :: ResourceId
hostedZoneId = ResourceId
pHostedZoneId_,
$sel:vpc:DisassociateVPCFromHostedZone' :: VPC
vpc = VPC
pVPC_
}
disassociateVPCFromHostedZone_comment :: Lens.Lens' DisassociateVPCFromHostedZone (Prelude.Maybe Prelude.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)
disassociateVPCFromHostedZone_hostedZoneId :: Lens.Lens' DisassociateVPCFromHostedZone ResourceId
disassociateVPCFromHostedZone_hostedZoneId :: Lens' DisassociateVPCFromHostedZone ResourceId
disassociateVPCFromHostedZone_hostedZoneId = 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)
disassociateVPCFromHostedZone_vpc :: Lens.Lens' DisassociateVPCFromHostedZone VPC
disassociateVPCFromHostedZone_vpc :: Lens' DisassociateVPCFromHostedZone VPC
disassociateVPCFromHostedZone_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 :: (Service -> Service)
-> DisassociateVPCFromHostedZone
-> Request DisassociateVPCFromHostedZone
request Service -> Service
overrides =
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DisassociateVPCFromHostedZone
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse DisassociateVPCFromHostedZone)))
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 ->
Int -> ChangeInfo -> DisassociateVPCFromHostedZoneResponse
DisassociateVPCFromHostedZoneResponse'
forall (f :: * -> *) a b. Functor 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 a
Data..@ Text
"ChangeInfo")
)
instance
Prelude.Hashable
DisassociateVPCFromHostedZone
where
hashWithSalt :: Int -> DisassociateVPCFromHostedZone -> Int
hashWithSalt Int
_salt 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
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
comment
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` ResourceId
hostedZoneId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` VPC
vpc
instance Prelude.NFData DisassociateVPCFromHostedZone where
rnf :: DisassociateVPCFromHostedZone -> ()
rnf 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
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
comment
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf ResourceId
hostedZoneId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf VPC
vpc
instance Data.ToElement DisassociateVPCFromHostedZone where
toElement :: DisassociateVPCFromHostedZone -> Element
toElement =
forall a. ToXML a => Name -> a -> Element
Data.mkElement
Name
"{https://route53.amazonaws.com/doc/2013-04-01/}DisassociateVPCFromHostedZoneRequest"
instance Data.ToHeaders DisassociateVPCFromHostedZone where
toHeaders :: DisassociateVPCFromHostedZone -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2013-04-01/hostedzone/",
forall a. ToByteString a => a -> ByteString
Data.toBS ResourceId
hostedZoneId,
ByteString
"/disassociatevpc"
]
instance Data.ToQuery DisassociateVPCFromHostedZone where
toQuery :: DisassociateVPCFromHostedZone -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.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
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[Name
"Comment" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe Text
comment, Name
"VPC" forall a. ToXML a => Name -> a -> XML
Data.@= VPC
vpc]
data DisassociateVPCFromHostedZoneResponse = DisassociateVPCFromHostedZoneResponse'
{
DisassociateVPCFromHostedZoneResponse -> Int
httpStatus :: Prelude.Int,
DisassociateVPCFromHostedZoneResponse -> ChangeInfo
changeInfo :: ChangeInfo
}
deriving (DisassociateVPCFromHostedZoneResponse
-> DisassociateVPCFromHostedZoneResponse -> Bool
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]
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
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.
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)
newDisassociateVPCFromHostedZoneResponse ::
Prelude.Int ->
ChangeInfo ->
DisassociateVPCFromHostedZoneResponse
newDisassociateVPCFromHostedZoneResponse :: Int -> ChangeInfo -> DisassociateVPCFromHostedZoneResponse
newDisassociateVPCFromHostedZoneResponse
Int
pHttpStatus_
ChangeInfo
pChangeInfo_ =
DisassociateVPCFromHostedZoneResponse'
{ $sel:httpStatus:DisassociateVPCFromHostedZoneResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:changeInfo:DisassociateVPCFromHostedZoneResponse' :: ChangeInfo
changeInfo = ChangeInfo
pChangeInfo_
}
disassociateVPCFromHostedZoneResponse_httpStatus :: Lens.Lens' DisassociateVPCFromHostedZoneResponse Prelude.Int
disassociateVPCFromHostedZoneResponse_httpStatus :: Lens' DisassociateVPCFromHostedZoneResponse Int
disassociateVPCFromHostedZoneResponse_httpStatus = 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)
disassociateVPCFromHostedZoneResponse_changeInfo :: Lens.Lens' DisassociateVPCFromHostedZoneResponse ChangeInfo
disassociateVPCFromHostedZoneResponse_changeInfo :: Lens' DisassociateVPCFromHostedZoneResponse ChangeInfo
disassociateVPCFromHostedZoneResponse_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
where
rnf :: DisassociateVPCFromHostedZoneResponse -> ()
rnf DisassociateVPCFromHostedZoneResponse' {Int
ChangeInfo
changeInfo :: ChangeInfo
httpStatus :: Int
$sel:changeInfo:DisassociateVPCFromHostedZoneResponse' :: DisassociateVPCFromHostedZoneResponse -> ChangeInfo
$sel:httpStatus:DisassociateVPCFromHostedZoneResponse' :: DisassociateVPCFromHostedZoneResponse -> Int
..} =
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 ChangeInfo
changeInfo