{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}
module Amazonka.IoT.Types.HttpUrlDestinationConfiguration where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data HttpUrlDestinationConfiguration = HttpUrlDestinationConfiguration'
{
HttpUrlDestinationConfiguration -> Text
confirmationUrl :: Prelude.Text
}
deriving (HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool
(HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool)
-> (HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool)
-> Eq HttpUrlDestinationConfiguration
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool
$c/= :: HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool
== :: HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool
$c== :: HttpUrlDestinationConfiguration
-> HttpUrlDestinationConfiguration -> Bool
Prelude.Eq, ReadPrec [HttpUrlDestinationConfiguration]
ReadPrec HttpUrlDestinationConfiguration
Int -> ReadS HttpUrlDestinationConfiguration
ReadS [HttpUrlDestinationConfiguration]
(Int -> ReadS HttpUrlDestinationConfiguration)
-> ReadS [HttpUrlDestinationConfiguration]
-> ReadPrec HttpUrlDestinationConfiguration
-> ReadPrec [HttpUrlDestinationConfiguration]
-> Read HttpUrlDestinationConfiguration
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [HttpUrlDestinationConfiguration]
$creadListPrec :: ReadPrec [HttpUrlDestinationConfiguration]
readPrec :: ReadPrec HttpUrlDestinationConfiguration
$creadPrec :: ReadPrec HttpUrlDestinationConfiguration
readList :: ReadS [HttpUrlDestinationConfiguration]
$creadList :: ReadS [HttpUrlDestinationConfiguration]
readsPrec :: Int -> ReadS HttpUrlDestinationConfiguration
$creadsPrec :: Int -> ReadS HttpUrlDestinationConfiguration
Prelude.Read, Int -> HttpUrlDestinationConfiguration -> ShowS
[HttpUrlDestinationConfiguration] -> ShowS
HttpUrlDestinationConfiguration -> String
(Int -> HttpUrlDestinationConfiguration -> ShowS)
-> (HttpUrlDestinationConfiguration -> String)
-> ([HttpUrlDestinationConfiguration] -> ShowS)
-> Show HttpUrlDestinationConfiguration
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [HttpUrlDestinationConfiguration] -> ShowS
$cshowList :: [HttpUrlDestinationConfiguration] -> ShowS
show :: HttpUrlDestinationConfiguration -> String
$cshow :: HttpUrlDestinationConfiguration -> String
showsPrec :: Int -> HttpUrlDestinationConfiguration -> ShowS
$cshowsPrec :: Int -> HttpUrlDestinationConfiguration -> ShowS
Prelude.Show, (forall x.
HttpUrlDestinationConfiguration
-> Rep HttpUrlDestinationConfiguration x)
-> (forall x.
Rep HttpUrlDestinationConfiguration x
-> HttpUrlDestinationConfiguration)
-> Generic HttpUrlDestinationConfiguration
forall x.
Rep HttpUrlDestinationConfiguration x
-> HttpUrlDestinationConfiguration
forall x.
HttpUrlDestinationConfiguration
-> Rep HttpUrlDestinationConfiguration x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep HttpUrlDestinationConfiguration x
-> HttpUrlDestinationConfiguration
$cfrom :: forall x.
HttpUrlDestinationConfiguration
-> Rep HttpUrlDestinationConfiguration x
Prelude.Generic)
newHttpUrlDestinationConfiguration ::
Prelude.Text ->
HttpUrlDestinationConfiguration
newHttpUrlDestinationConfiguration :: Text -> HttpUrlDestinationConfiguration
newHttpUrlDestinationConfiguration Text
pConfirmationUrl_ =
HttpUrlDestinationConfiguration' :: Text -> HttpUrlDestinationConfiguration
HttpUrlDestinationConfiguration'
{ $sel:confirmationUrl:HttpUrlDestinationConfiguration' :: Text
confirmationUrl =
Text
pConfirmationUrl_
}
httpUrlDestinationConfiguration_confirmationUrl :: Lens.Lens' HttpUrlDestinationConfiguration Prelude.Text
httpUrlDestinationConfiguration_confirmationUrl :: (Text -> f Text)
-> HttpUrlDestinationConfiguration
-> f HttpUrlDestinationConfiguration
httpUrlDestinationConfiguration_confirmationUrl = (HttpUrlDestinationConfiguration -> Text)
-> (HttpUrlDestinationConfiguration
-> Text -> HttpUrlDestinationConfiguration)
-> Lens
HttpUrlDestinationConfiguration
HttpUrlDestinationConfiguration
Text
Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\HttpUrlDestinationConfiguration' {Text
confirmationUrl :: Text
$sel:confirmationUrl:HttpUrlDestinationConfiguration' :: HttpUrlDestinationConfiguration -> Text
confirmationUrl} -> Text
confirmationUrl) (\s :: HttpUrlDestinationConfiguration
s@HttpUrlDestinationConfiguration' {} Text
a -> HttpUrlDestinationConfiguration
s {$sel:confirmationUrl:HttpUrlDestinationConfiguration' :: Text
confirmationUrl = Text
a} :: HttpUrlDestinationConfiguration)
instance
Prelude.Hashable
HttpUrlDestinationConfiguration
instance
Prelude.NFData
HttpUrlDestinationConfiguration
instance Core.ToJSON HttpUrlDestinationConfiguration where
toJSON :: HttpUrlDestinationConfiguration -> Value
toJSON HttpUrlDestinationConfiguration' {Text
confirmationUrl :: Text
$sel:confirmationUrl:HttpUrlDestinationConfiguration' :: HttpUrlDestinationConfiguration -> Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ Pair -> Maybe Pair
forall a. a -> Maybe a
Prelude.Just
(Text
"confirmationUrl" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..= Text
confirmationUrl)
]
)