{-# 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.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
data =
{
:: Prelude.Maybe Prelude.Text,
:: ResourceId
}
deriving (UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool
(UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool)
-> (UpdateHostedZoneComment -> UpdateHostedZoneComment -> Bool)
-> Eq UpdateHostedZoneComment
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]
(Int -> ReadS UpdateHostedZoneComment)
-> ReadS [UpdateHostedZoneComment]
-> ReadPrec UpdateHostedZoneComment
-> ReadPrec [UpdateHostedZoneComment]
-> Read 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
(Int -> UpdateHostedZoneComment -> ShowS)
-> (UpdateHostedZoneComment -> String)
-> ([UpdateHostedZoneComment] -> ShowS)
-> Show UpdateHostedZoneComment
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.
UpdateHostedZoneComment -> Rep UpdateHostedZoneComment x)
-> (forall x.
Rep UpdateHostedZoneComment x -> UpdateHostedZoneComment)
-> Generic UpdateHostedZoneComment
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' :: Maybe Text -> ResourceId -> UpdateHostedZoneComment
UpdateHostedZoneComment'
{ $sel:comment:UpdateHostedZoneComment' :: Maybe Text
comment = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:id:UpdateHostedZoneComment' :: ResourceId
id = ResourceId
pId_
}
updateHostedZoneComment_comment :: Lens.Lens' UpdateHostedZoneComment (Prelude.Maybe Prelude.Text)
= (UpdateHostedZoneComment -> Maybe Text)
-> (UpdateHostedZoneComment
-> Maybe Text -> UpdateHostedZoneComment)
-> Lens
UpdateHostedZoneComment
UpdateHostedZoneComment
(Maybe Text)
(Maybe 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
= (UpdateHostedZoneComment -> ResourceId)
-> (UpdateHostedZoneComment
-> ResourceId -> UpdateHostedZoneComment)
-> Lens
UpdateHostedZoneComment
UpdateHostedZoneComment
ResourceId
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 :: UpdateHostedZoneComment -> Request UpdateHostedZoneComment
request = Service
-> UpdateHostedZoneComment -> Request UpdateHostedZoneComment
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateHostedZoneComment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateHostedZoneComment)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse UpdateHostedZoneComment))
-> Logger
-> Service
-> Proxy UpdateHostedZoneComment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateHostedZoneComment)))
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 -> HostedZone -> UpdateHostedZoneCommentResponse
UpdateHostedZoneCommentResponse'
(Int -> HostedZone -> UpdateHostedZoneCommentResponse)
-> Either String Int
-> Either String (HostedZone -> UpdateHostedZoneCommentResponse)
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 (HostedZone -> UpdateHostedZoneCommentResponse)
-> Either String HostedZone
-> Either String UpdateHostedZoneCommentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String HostedZone
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"HostedZone")
)
instance Prelude.Hashable UpdateHostedZoneComment
instance Prelude.NFData UpdateHostedZoneComment
instance Core.ToElement UpdateHostedZoneComment where
toElement :: UpdateHostedZoneComment -> Element
toElement =
Name -> UpdateHostedZoneComment -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{https://route53.amazonaws.com/doc/2013-04-01/}UpdateHostedZoneCommentRequest"
instance Core.ToHeaders UpdateHostedZoneComment where
toHeaders :: UpdateHostedZoneComment -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateHostedZoneComment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.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
..} =
[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
id]
instance Core.ToQuery UpdateHostedZoneComment where
toQuery :: UpdateHostedZoneComment -> QueryString
toQuery = QueryString -> UpdateHostedZoneComment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
instance Core.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
..} =
[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]
data =
{
:: Prelude.Int,
:: HostedZone
}
deriving (UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool
(UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool)
-> (UpdateHostedZoneCommentResponse
-> UpdateHostedZoneCommentResponse -> Bool)
-> Eq UpdateHostedZoneCommentResponse
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]
(Int -> ReadS UpdateHostedZoneCommentResponse)
-> ReadS [UpdateHostedZoneCommentResponse]
-> ReadPrec UpdateHostedZoneCommentResponse
-> ReadPrec [UpdateHostedZoneCommentResponse]
-> Read 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
(Int -> UpdateHostedZoneCommentResponse -> ShowS)
-> (UpdateHostedZoneCommentResponse -> String)
-> ([UpdateHostedZoneCommentResponse] -> ShowS)
-> Show UpdateHostedZoneCommentResponse
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.
UpdateHostedZoneCommentResponse
-> Rep UpdateHostedZoneCommentResponse x)
-> (forall x.
Rep UpdateHostedZoneCommentResponse x
-> UpdateHostedZoneCommentResponse)
-> Generic UpdateHostedZoneCommentResponse
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' :: Int -> HostedZone -> UpdateHostedZoneCommentResponse
UpdateHostedZoneCommentResponse'
{ $sel:httpStatus:UpdateHostedZoneCommentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:hostedZone:UpdateHostedZoneCommentResponse' :: HostedZone
hostedZone = HostedZone
pHostedZone_
}
updateHostedZoneCommentResponse_httpStatus :: Lens.Lens' UpdateHostedZoneCommentResponse Prelude.Int
= (UpdateHostedZoneCommentResponse -> Int)
-> (UpdateHostedZoneCommentResponse
-> Int -> UpdateHostedZoneCommentResponse)
-> Lens
UpdateHostedZoneCommentResponse
UpdateHostedZoneCommentResponse
Int
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
= (UpdateHostedZoneCommentResponse -> HostedZone)
-> (UpdateHostedZoneCommentResponse
-> HostedZone -> UpdateHostedZoneCommentResponse)
-> Lens
UpdateHostedZoneCommentResponse
UpdateHostedZoneCommentResponse
HostedZone
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