{-# 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.UpdateTrafficPolicyComment
(
UpdateTrafficPolicyComment (..),
newUpdateTrafficPolicyComment,
updateTrafficPolicyComment_id,
updateTrafficPolicyComment_version,
updateTrafficPolicyComment_comment,
UpdateTrafficPolicyCommentResponse (..),
newUpdateTrafficPolicyCommentResponse,
updateTrafficPolicyCommentResponse_httpStatus,
updateTrafficPolicyCommentResponse_trafficPolicy,
)
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.Text,
:: Prelude.Natural,
:: Prelude.Text
}
deriving (UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool
(UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool)
-> (UpdateTrafficPolicyComment
-> UpdateTrafficPolicyComment -> Bool)
-> Eq UpdateTrafficPolicyComment
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool
$c/= :: UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool
== :: UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool
$c== :: UpdateTrafficPolicyComment -> UpdateTrafficPolicyComment -> Bool
Prelude.Eq, ReadPrec [UpdateTrafficPolicyComment]
ReadPrec UpdateTrafficPolicyComment
Int -> ReadS UpdateTrafficPolicyComment
ReadS [UpdateTrafficPolicyComment]
(Int -> ReadS UpdateTrafficPolicyComment)
-> ReadS [UpdateTrafficPolicyComment]
-> ReadPrec UpdateTrafficPolicyComment
-> ReadPrec [UpdateTrafficPolicyComment]
-> Read UpdateTrafficPolicyComment
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrafficPolicyComment]
$creadListPrec :: ReadPrec [UpdateTrafficPolicyComment]
readPrec :: ReadPrec UpdateTrafficPolicyComment
$creadPrec :: ReadPrec UpdateTrafficPolicyComment
readList :: ReadS [UpdateTrafficPolicyComment]
$creadList :: ReadS [UpdateTrafficPolicyComment]
readsPrec :: Int -> ReadS UpdateTrafficPolicyComment
$creadsPrec :: Int -> ReadS UpdateTrafficPolicyComment
Prelude.Read, Int -> UpdateTrafficPolicyComment -> ShowS
[UpdateTrafficPolicyComment] -> ShowS
UpdateTrafficPolicyComment -> String
(Int -> UpdateTrafficPolicyComment -> ShowS)
-> (UpdateTrafficPolicyComment -> String)
-> ([UpdateTrafficPolicyComment] -> ShowS)
-> Show UpdateTrafficPolicyComment
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrafficPolicyComment] -> ShowS
$cshowList :: [UpdateTrafficPolicyComment] -> ShowS
show :: UpdateTrafficPolicyComment -> String
$cshow :: UpdateTrafficPolicyComment -> String
showsPrec :: Int -> UpdateTrafficPolicyComment -> ShowS
$cshowsPrec :: Int -> UpdateTrafficPolicyComment -> ShowS
Prelude.Show, (forall x.
UpdateTrafficPolicyComment -> Rep UpdateTrafficPolicyComment x)
-> (forall x.
Rep UpdateTrafficPolicyComment x -> UpdateTrafficPolicyComment)
-> Generic UpdateTrafficPolicyComment
forall x.
Rep UpdateTrafficPolicyComment x -> UpdateTrafficPolicyComment
forall x.
UpdateTrafficPolicyComment -> Rep UpdateTrafficPolicyComment x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTrafficPolicyComment x -> UpdateTrafficPolicyComment
$cfrom :: forall x.
UpdateTrafficPolicyComment -> Rep UpdateTrafficPolicyComment x
Prelude.Generic)
newUpdateTrafficPolicyComment ::
Prelude.Text ->
Prelude.Natural ->
Prelude.Text ->
UpdateTrafficPolicyComment
Text
pId_
Natural
pVersion_
Text
pComment_ =
UpdateTrafficPolicyComment' :: Text -> Natural -> Text -> UpdateTrafficPolicyComment
UpdateTrafficPolicyComment'
{ $sel:id:UpdateTrafficPolicyComment' :: Text
id = Text
pId_,
$sel:version:UpdateTrafficPolicyComment' :: Natural
version = Natural
pVersion_,
$sel:comment:UpdateTrafficPolicyComment' :: Text
comment = Text
pComment_
}
updateTrafficPolicyComment_id :: Lens.Lens' UpdateTrafficPolicyComment Prelude.Text
= (UpdateTrafficPolicyComment -> Text)
-> (UpdateTrafficPolicyComment
-> Text -> UpdateTrafficPolicyComment)
-> Lens
UpdateTrafficPolicyComment UpdateTrafficPolicyComment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrafficPolicyComment' {Text
id :: Text
$sel:id:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
id} -> Text
id) (\s :: UpdateTrafficPolicyComment
s@UpdateTrafficPolicyComment' {} Text
a -> UpdateTrafficPolicyComment
s {$sel:id:UpdateTrafficPolicyComment' :: Text
id = Text
a} :: UpdateTrafficPolicyComment)
updateTrafficPolicyComment_version :: Lens.Lens' UpdateTrafficPolicyComment Prelude.Natural
= (UpdateTrafficPolicyComment -> Natural)
-> (UpdateTrafficPolicyComment
-> Natural -> UpdateTrafficPolicyComment)
-> Lens
UpdateTrafficPolicyComment
UpdateTrafficPolicyComment
Natural
Natural
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrafficPolicyComment' {Natural
version :: Natural
$sel:version:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Natural
version} -> Natural
version) (\s :: UpdateTrafficPolicyComment
s@UpdateTrafficPolicyComment' {} Natural
a -> UpdateTrafficPolicyComment
s {$sel:version:UpdateTrafficPolicyComment' :: Natural
version = Natural
a} :: UpdateTrafficPolicyComment)
updateTrafficPolicyComment_comment :: Lens.Lens' UpdateTrafficPolicyComment Prelude.Text
= (UpdateTrafficPolicyComment -> Text)
-> (UpdateTrafficPolicyComment
-> Text -> UpdateTrafficPolicyComment)
-> Lens
UpdateTrafficPolicyComment UpdateTrafficPolicyComment Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrafficPolicyComment' {Text
comment :: Text
$sel:comment:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
comment} -> Text
comment) (\s :: UpdateTrafficPolicyComment
s@UpdateTrafficPolicyComment' {} Text
a -> UpdateTrafficPolicyComment
s {$sel:comment:UpdateTrafficPolicyComment' :: Text
comment = Text
a} :: UpdateTrafficPolicyComment)
instance Core.AWSRequest UpdateTrafficPolicyComment where
type
AWSResponse UpdateTrafficPolicyComment =
UpdateTrafficPolicyCommentResponse
request :: UpdateTrafficPolicyComment -> Request UpdateTrafficPolicyComment
request = Service
-> UpdateTrafficPolicyComment -> Request UpdateTrafficPolicyComment
forall a. (ToRequest a, ToElement a) => Service -> a -> Request a
Request.postXML Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateTrafficPolicyComment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateTrafficPolicyComment)))
response =
(Int
-> ResponseHeaders
-> [Node]
-> Either String (AWSResponse UpdateTrafficPolicyComment))
-> Logger
-> Service
-> Proxy UpdateTrafficPolicyComment
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateTrafficPolicyComment)))
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 -> TrafficPolicy -> UpdateTrafficPolicyCommentResponse
UpdateTrafficPolicyCommentResponse'
(Int -> TrafficPolicy -> UpdateTrafficPolicyCommentResponse)
-> Either String Int
-> Either
String (TrafficPolicy -> UpdateTrafficPolicyCommentResponse)
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 (TrafficPolicy -> UpdateTrafficPolicyCommentResponse)
-> Either String TrafficPolicy
-> Either String UpdateTrafficPolicyCommentResponse
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ([Node]
x [Node] -> Text -> Either String TrafficPolicy
forall a. FromXML a => [Node] -> Text -> Either String a
Core..@ Text
"TrafficPolicy")
)
instance Prelude.Hashable UpdateTrafficPolicyComment
instance Prelude.NFData UpdateTrafficPolicyComment
instance Core.ToElement UpdateTrafficPolicyComment where
toElement :: UpdateTrafficPolicyComment -> Element
toElement =
Name -> UpdateTrafficPolicyComment -> Element
forall a. ToXML a => Name -> a -> Element
Core.mkElement
Name
"{https://route53.amazonaws.com/doc/2013-04-01/}UpdateTrafficPolicyCommentRequest"
instance Core.ToHeaders UpdateTrafficPolicyComment where
toHeaders :: UpdateTrafficPolicyComment -> ResponseHeaders
toHeaders = ResponseHeaders -> UpdateTrafficPolicyComment -> ResponseHeaders
forall a b. a -> b -> a
Prelude.const ResponseHeaders
forall a. Monoid a => a
Prelude.mempty
instance Core.ToPath UpdateTrafficPolicyComment where
toPath :: UpdateTrafficPolicyComment -> ByteString
toPath UpdateTrafficPolicyComment' {Natural
Text
comment :: Text
version :: Natural
id :: Text
$sel:comment:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
$sel:version:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Natural
$sel:id:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
..} =
[ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/2013-04-01/trafficpolicy/",
Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
id,
ByteString
"/",
Natural -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Natural
version
]
instance Core.ToQuery UpdateTrafficPolicyComment where
toQuery :: UpdateTrafficPolicyComment -> QueryString
toQuery = QueryString -> UpdateTrafficPolicyComment -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
instance Core.ToXML UpdateTrafficPolicyComment where
toXML :: UpdateTrafficPolicyComment -> XML
toXML UpdateTrafficPolicyComment' {Natural
Text
comment :: Text
version :: Natural
id :: Text
$sel:comment:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
$sel:version:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Natural
$sel:id:UpdateTrafficPolicyComment' :: UpdateTrafficPolicyComment -> Text
..} =
[XML] -> XML
forall a. Monoid a => [a] -> a
Prelude.mconcat [Name
"Comment" Name -> Text -> XML
forall a. ToXML a => Name -> a -> XML
Core.@= Text
comment]
data =
{
:: Prelude.Int,
:: TrafficPolicy
}
deriving (UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool
(UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool)
-> (UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool)
-> Eq UpdateTrafficPolicyCommentResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool
$c/= :: UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool
== :: UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool
$c== :: UpdateTrafficPolicyCommentResponse
-> UpdateTrafficPolicyCommentResponse -> Bool
Prelude.Eq, ReadPrec [UpdateTrafficPolicyCommentResponse]
ReadPrec UpdateTrafficPolicyCommentResponse
Int -> ReadS UpdateTrafficPolicyCommentResponse
ReadS [UpdateTrafficPolicyCommentResponse]
(Int -> ReadS UpdateTrafficPolicyCommentResponse)
-> ReadS [UpdateTrafficPolicyCommentResponse]
-> ReadPrec UpdateTrafficPolicyCommentResponse
-> ReadPrec [UpdateTrafficPolicyCommentResponse]
-> Read UpdateTrafficPolicyCommentResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateTrafficPolicyCommentResponse]
$creadListPrec :: ReadPrec [UpdateTrafficPolicyCommentResponse]
readPrec :: ReadPrec UpdateTrafficPolicyCommentResponse
$creadPrec :: ReadPrec UpdateTrafficPolicyCommentResponse
readList :: ReadS [UpdateTrafficPolicyCommentResponse]
$creadList :: ReadS [UpdateTrafficPolicyCommentResponse]
readsPrec :: Int -> ReadS UpdateTrafficPolicyCommentResponse
$creadsPrec :: Int -> ReadS UpdateTrafficPolicyCommentResponse
Prelude.Read, Int -> UpdateTrafficPolicyCommentResponse -> ShowS
[UpdateTrafficPolicyCommentResponse] -> ShowS
UpdateTrafficPolicyCommentResponse -> String
(Int -> UpdateTrafficPolicyCommentResponse -> ShowS)
-> (UpdateTrafficPolicyCommentResponse -> String)
-> ([UpdateTrafficPolicyCommentResponse] -> ShowS)
-> Show UpdateTrafficPolicyCommentResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateTrafficPolicyCommentResponse] -> ShowS
$cshowList :: [UpdateTrafficPolicyCommentResponse] -> ShowS
show :: UpdateTrafficPolicyCommentResponse -> String
$cshow :: UpdateTrafficPolicyCommentResponse -> String
showsPrec :: Int -> UpdateTrafficPolicyCommentResponse -> ShowS
$cshowsPrec :: Int -> UpdateTrafficPolicyCommentResponse -> ShowS
Prelude.Show, (forall x.
UpdateTrafficPolicyCommentResponse
-> Rep UpdateTrafficPolicyCommentResponse x)
-> (forall x.
Rep UpdateTrafficPolicyCommentResponse x
-> UpdateTrafficPolicyCommentResponse)
-> Generic UpdateTrafficPolicyCommentResponse
forall x.
Rep UpdateTrafficPolicyCommentResponse x
-> UpdateTrafficPolicyCommentResponse
forall x.
UpdateTrafficPolicyCommentResponse
-> Rep UpdateTrafficPolicyCommentResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateTrafficPolicyCommentResponse x
-> UpdateTrafficPolicyCommentResponse
$cfrom :: forall x.
UpdateTrafficPolicyCommentResponse
-> Rep UpdateTrafficPolicyCommentResponse x
Prelude.Generic)
newUpdateTrafficPolicyCommentResponse ::
Prelude.Int ->
TrafficPolicy ->
UpdateTrafficPolicyCommentResponse
Int
pHttpStatus_
TrafficPolicy
pTrafficPolicy_ =
UpdateTrafficPolicyCommentResponse' :: Int -> TrafficPolicy -> UpdateTrafficPolicyCommentResponse
UpdateTrafficPolicyCommentResponse'
{ $sel:httpStatus:UpdateTrafficPolicyCommentResponse' :: Int
httpStatus =
Int
pHttpStatus_,
$sel:trafficPolicy:UpdateTrafficPolicyCommentResponse' :: TrafficPolicy
trafficPolicy = TrafficPolicy
pTrafficPolicy_
}
updateTrafficPolicyCommentResponse_httpStatus :: Lens.Lens' UpdateTrafficPolicyCommentResponse Prelude.Int
= (UpdateTrafficPolicyCommentResponse -> Int)
-> (UpdateTrafficPolicyCommentResponse
-> Int -> UpdateTrafficPolicyCommentResponse)
-> Lens
UpdateTrafficPolicyCommentResponse
UpdateTrafficPolicyCommentResponse
Int
Int
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrafficPolicyCommentResponse' {Int
httpStatus :: Int
$sel:httpStatus:UpdateTrafficPolicyCommentResponse' :: UpdateTrafficPolicyCommentResponse -> Int
httpStatus} -> Int
httpStatus) (\s :: UpdateTrafficPolicyCommentResponse
s@UpdateTrafficPolicyCommentResponse' {} Int
a -> UpdateTrafficPolicyCommentResponse
s {$sel:httpStatus:UpdateTrafficPolicyCommentResponse' :: Int
httpStatus = Int
a} :: UpdateTrafficPolicyCommentResponse)
updateTrafficPolicyCommentResponse_trafficPolicy :: Lens.Lens' UpdateTrafficPolicyCommentResponse TrafficPolicy
= (UpdateTrafficPolicyCommentResponse -> TrafficPolicy)
-> (UpdateTrafficPolicyCommentResponse
-> TrafficPolicy -> UpdateTrafficPolicyCommentResponse)
-> Lens
UpdateTrafficPolicyCommentResponse
UpdateTrafficPolicyCommentResponse
TrafficPolicy
TrafficPolicy
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateTrafficPolicyCommentResponse' {TrafficPolicy
trafficPolicy :: TrafficPolicy
$sel:trafficPolicy:UpdateTrafficPolicyCommentResponse' :: UpdateTrafficPolicyCommentResponse -> TrafficPolicy
trafficPolicy} -> TrafficPolicy
trafficPolicy) (\s :: UpdateTrafficPolicyCommentResponse
s@UpdateTrafficPolicyCommentResponse' {} TrafficPolicy
a -> UpdateTrafficPolicyCommentResponse
s {$sel:trafficPolicy:UpdateTrafficPolicyCommentResponse' :: TrafficPolicy
trafficPolicy = TrafficPolicy
a} :: UpdateTrafficPolicyCommentResponse)
instance
Prelude.NFData
UpdateTrafficPolicyCommentResponse