{-# 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.UpdateHostedZoneComment
(
UpdateHostedZoneComment (..),
newUpdateHostedZoneComment,
updateHostedZoneComment_comment,
updateHostedZoneComment_id,
UpdateHostedZoneCommentResponse (..),
newUpdateHostedZoneCommentResponse,
updateHostedZoneCommentResponse_httpStatus,
updateHostedZoneCommentResponse_hostedZone,
)
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 =
{
:: Prelude.Maybe Prelude.Text,
:: ResourceId
}
deriving (UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
$c/= :: UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
== :: UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
$c== :: UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
Prelude.Eq, ReadPrec [UpdateHostedZoneComment]
ReadPrec UpdateHostedZoneComment
Int -> ReadS UpdateHostedZoneComment
ReadS [UpdateHostedZoneComment]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateHostedZoneComment]
$creadListPrec :: ReadPrec [UpdateHostedZoneComment]
readPrec :: ReadPrec UpdateHostedZoneComment
$creadPrec :: ReadPrec UpdateHostedZoneComment
readList :: ReadS [UpdateHostedZoneComment]
$creadList :: ReadS [UpdateHostedZoneComment]
readsPrec :: Int -> ReadS UpdateHostedZoneComment
$creadsPrec :: Int -> ReadS UpdateHostedZoneComment
Prelude.Read, Int -> UpdateHostedZoneComment -> ShowS
[UpdateHostedZoneComment] -> ShowS
UpdateHostedZoneComment -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateHostedZoneComment] -> ShowS
$cshowList :: [UpdateHostedZoneComment] -> ShowS
show :: UpdateHostedZoneComment -> String
$cshow :: UpdateHostedZoneComment -> String
showsPrec :: Int -> UpdateHostedZoneComment -> ShowS
$cshowsPrec :: Int -> UpdateHostedZoneComment -> ShowS
Prelude.Show, forall x. Rep UpdateHostedZoneComment x -> UpdateHostedZoneComment
forall x. UpdateHostedZoneComment -> Rep UpdateHostedZoneComment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateHostedZoneComment x -> UpdateHostedZoneComment
$cfrom :: forall x. UpdateHostedZoneComment -> Rep UpdateHostedZoneComment x
Prelude.Generic)
newUpdateHostedZoneComment ::
ResourceId ->
UpdateHostedZoneComment
ResourceId
pId_ =
UpdateHostedZoneComment'
{ $sel:comment:UpdateHostedZoneComment' :: Maybe Text
comment = forall a. Maybe a
Prelude.Nothing,
$sel:id:UpdateHostedZoneComment' :: ResourceId
id = ResourceId
pId_
}
updateHostedZoneComment_comment :: Lens.Lens' UpdateHostedZoneComment (Prelude.Maybe Prelude.Text)
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateHostedZoneComment' {Maybe Text
comment :: Maybe Text
$sel:comment:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> Maybe Text
comment} -> Maybe Text
comment) (\s :: UpdateHostedZoneComment
s@UpdateHostedZoneComment' {} Maybe Text
a -> UpdateHostedZoneComment
s {$sel:comment:UpdateHostedZoneComment' :: Maybe Text
comment = Maybe Text
a} :: UpdateHostedZoneComment)
updateHostedZoneComment_id :: Lens.Lens' UpdateHostedZoneComment ResourceId
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateHostedZoneComment' {ResourceId
id :: ResourceId
$sel:id:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> ResourceId
id} -> ResourceId
id) (\s :: UpdateHostedZoneComment
s@UpdateHostedZoneComment' {} ResourceId
a -> UpdateHostedZoneComment
s {$sel:id:UpdateHostedZoneComment' :: ResourceId
id = ResourceId
a} :: UpdateHostedZoneComment)
instance Core.AWSRequest UpdateHostedZoneComment where
type
AWSResponse UpdateHostedZoneComment =
UpdateHostedZoneCommentResponse
request :: (Service -> Service)
-> UpdateHostedZoneComment -> Request UpdateHostedZoneComment
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 UpdateHostedZoneComment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateHostedZoneComment)))
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 -> HostedZone -> UpdateHostedZoneCommentResponse
UpdateHostedZoneCommentResponse'
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
"HostedZone")
)
instance Prelude.Hashable UpdateHostedZoneComment where
hashWithSalt :: Int -> UpdateHostedZoneComment -> Int
hashWithSalt Int
_salt UpdateHostedZoneComment' {Maybe Text
ResourceId
id :: ResourceId
comment :: Maybe Text
$sel:id:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> ResourceId
$sel:comment:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> 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
id
instance Prelude.NFData UpdateHostedZoneComment where
rnf :: UpdateHostedZoneComment -> ()
rnf UpdateHostedZoneComment' {Maybe Text
ResourceId
id :: ResourceId
comment :: Maybe Text
$sel:id:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> ResourceId
$sel:comment:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> 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
id
instance Data.ToElement UpdateHostedZoneComment where
toElement :: UpdateHostedZoneComment -> Element
toElement =
forall a. ToXML a => Name -> a -> Element
Data.mkElement
Name
"{https://route53.amazonaws.com/doc/2013-04-01/}UpdateHostedZoneCommentRequest"
instance Data.ToHeaders UpdateHostedZoneComment where
toHeaders :: UpdateHostedZoneComment -> ResponseHeaders
toHeaders = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToPath UpdateHostedZoneComment where
toPath :: UpdateHostedZoneComment -> ByteString
toPath UpdateHostedZoneComment' {Maybe Text
ResourceId
id :: ResourceId
comment :: Maybe Text
$sel:id:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> ResourceId
$sel:comment:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ByteString
"/2013-04-01/hostedzone/", forall a. ToByteString a => a -> ByteString
Data.toBS ResourceId
id]
instance Data.ToQuery UpdateHostedZoneComment where
toQuery :: UpdateHostedZoneComment -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
instance Data.ToXML UpdateHostedZoneComment where
toXML :: UpdateHostedZoneComment -> XML
toXML UpdateHostedZoneComment' {Maybe Text
ResourceId
id :: ResourceId
comment :: Maybe Text
$sel:id:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> ResourceId
$sel:comment:UpdateHostedZoneComment' :: UpdateHostedZoneComment -> Maybe Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Comment" forall a. ToXML a => Name -> a -> XML
Data.@= Maybe Text
comment]
data =
{
:: Prelude.Int,
:: HostedZone
}
deriving (UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
$c/= :: UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
== :: UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
$c== :: UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
Prelude.Eq, ReadPrec [UpdateHostedZoneCommentResponse]
ReadPrec UpdateHostedZoneCommentResponse
Int -> ReadS UpdateHostedZoneCommentResponse
ReadS [UpdateHostedZoneCommentResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateHostedZoneCommentResponse]
$creadListPrec :: ReadPrec [UpdateHostedZoneCommentResponse]
readPrec :: ReadPrec UpdateHostedZoneCommentResponse
$creadPrec :: ReadPrec UpdateHostedZoneCommentResponse
readList :: ReadS [UpdateHostedZoneCommentResponse]
$creadList :: ReadS [UpdateHostedZoneCommentResponse]
readsPrec :: Int -> ReadS UpdateHostedZoneCommentResponse
$creadsPrec :: Int -> ReadS UpdateHostedZoneCommentResponse
Prelude.Read, Int -> UpdateHostedZoneCommentResponse -> ShowS
[UpdateHostedZoneCommentResponse] -> ShowS
UpdateHostedZoneCommentResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateHostedZoneCommentResponse] -> ShowS
$cshowList :: [UpdateHostedZoneCommentResponse] -> ShowS
show :: UpdateHostedZoneCommentResponse -> String
$cshow :: UpdateHostedZoneCommentResponse -> String
showsPrec :: Int -> UpdateHostedZoneCommentResponse -> ShowS
$cshowsPrec :: Int -> UpdateHostedZoneCommentResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateHostedZoneCommentResponse x
-> UpdateHostedZoneCommentResponse
forall x.
UpdateHostedZoneCommentResponse
-> Rep UpdateHostedZoneCommentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateHostedZoneCommentResponse x
-> UpdateHostedZoneCommentResponse
$cfrom :: forall x.
UpdateHostedZoneCommentResponse
-> Rep UpdateHostedZoneCommentResponse x
Prelude.Generic)
newUpdateHostedZoneCommentResponse ::
Prelude.Int ->
HostedZone ->
UpdateHostedZoneCommentResponse
Int
pHttpStatus_
HostedZone
pHostedZone_ =
UpdateHostedZoneCommentResponse'
{ $sel:httpStatus:UpdateHostedZoneCommentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:hostedZone:UpdateHostedZoneCommentResponse' :: HostedZone
hostedZone = HostedZone
pHostedZone_
}
updateHostedZoneCommentResponse_httpStatus :: Lens.Lens' UpdateHostedZoneCommentResponse Prelude.Int
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateHostedZoneCommentResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateHostedZoneCommentResponse' :: UpdateHostedZoneCommentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateHostedZoneCommentResponse
s@UpdateHostedZoneCommentResponse' {} Int
a -> UpdateHostedZoneCommentResponse
s {$sel:httpStatus:UpdateHostedZoneCommentResponse' :: Int
httpStatus = Int
a} :: UpdateHostedZoneCommentResponse)
updateHostedZoneCommentResponse_hostedZone :: Lens.Lens' UpdateHostedZoneCommentResponse HostedZone
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateHostedZoneCommentResponse' {HostedZone
hostedZone :: HostedZone
$sel:hostedZone:UpdateHostedZoneCommentResponse' :: UpdateHostedZoneCommentResponse -> HostedZone
hostedZone} -> HostedZone
hostedZone) (\s :: UpdateHostedZoneCommentResponse
s@UpdateHostedZoneCommentResponse' {} HostedZone
a -> UpdateHostedZoneCommentResponse
s {$sel:hostedZone:UpdateHostedZoneCommentResponse' :: HostedZone
hostedZone = HostedZone
a} :: UpdateHostedZoneCommentResponse)
instance
Prelude.NFData
UpdateHostedZoneCommentResponse
where
rnf :: UpdateHostedZoneCommentResponse -> ()
rnf UpdateHostedZoneCommentResponse' {Int
HostedZone
hostedZone :: HostedZone
httpStatus :: Int
$sel:hostedZone:UpdateHostedZoneCommentResponse' :: UpdateHostedZoneCommentResponse -> HostedZone
$sel:httpStatus:UpdateHostedZoneCommentResponse' :: UpdateHostedZoneCommentResponse -> 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 HostedZone
hostedZone