{-# 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.Pipes.Types.PipeEnrichmentHttpParameters 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
data PipeEnrichmentHttpParameters = PipeEnrichmentHttpParameters'
{
:: Prelude.Maybe (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text)),
PipeEnrichmentHttpParameters -> Maybe [Sensitive Text]
pathParameterValues :: Prelude.Maybe [Data.Sensitive Prelude.Text],
PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
queryStringParameters :: Prelude.Maybe (Prelude.HashMap Prelude.Text (Data.Sensitive Prelude.Text))
}
deriving (PipeEnrichmentHttpParameters
-> PipeEnrichmentHttpParameters -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: PipeEnrichmentHttpParameters
-> PipeEnrichmentHttpParameters -> Bool
$c/= :: PipeEnrichmentHttpParameters
-> PipeEnrichmentHttpParameters -> Bool
== :: PipeEnrichmentHttpParameters
-> PipeEnrichmentHttpParameters -> Bool
$c== :: PipeEnrichmentHttpParameters
-> PipeEnrichmentHttpParameters -> Bool
Prelude.Eq, Int -> PipeEnrichmentHttpParameters -> ShowS
[PipeEnrichmentHttpParameters] -> ShowS
PipeEnrichmentHttpParameters -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [PipeEnrichmentHttpParameters] -> ShowS
$cshowList :: [PipeEnrichmentHttpParameters] -> ShowS
show :: PipeEnrichmentHttpParameters -> String
$cshow :: PipeEnrichmentHttpParameters -> String
showsPrec :: Int -> PipeEnrichmentHttpParameters -> ShowS
$cshowsPrec :: Int -> PipeEnrichmentHttpParameters -> ShowS
Prelude.Show, forall x.
Rep PipeEnrichmentHttpParameters x -> PipeEnrichmentHttpParameters
forall x.
PipeEnrichmentHttpParameters -> Rep PipeEnrichmentHttpParameters x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep PipeEnrichmentHttpParameters x -> PipeEnrichmentHttpParameters
$cfrom :: forall x.
PipeEnrichmentHttpParameters -> Rep PipeEnrichmentHttpParameters x
Prelude.Generic)
newPipeEnrichmentHttpParameters ::
PipeEnrichmentHttpParameters
newPipeEnrichmentHttpParameters :: PipeEnrichmentHttpParameters
newPipeEnrichmentHttpParameters =
PipeEnrichmentHttpParameters'
{ $sel:headerParameters:PipeEnrichmentHttpParameters' :: Maybe (HashMap Text (Sensitive Text))
headerParameters =
forall a. Maybe a
Prelude.Nothing,
$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: Maybe [Sensitive Text]
pathParameterValues = forall a. Maybe a
Prelude.Nothing,
$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: Maybe (HashMap Text (Sensitive Text))
queryStringParameters = forall a. Maybe a
Prelude.Nothing
}
pipeEnrichmentHttpParameters_headerParameters :: Lens.Lens' PipeEnrichmentHttpParameters (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
= forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipeEnrichmentHttpParameters' {Maybe (HashMap Text (Sensitive Text))
headerParameters :: Maybe (HashMap Text (Sensitive Text))
$sel:headerParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
headerParameters} -> Maybe (HashMap Text (Sensitive Text))
headerParameters) (\s :: PipeEnrichmentHttpParameters
s@PipeEnrichmentHttpParameters' {} Maybe (HashMap Text (Sensitive Text))
a -> PipeEnrichmentHttpParameters
s {$sel:headerParameters:PipeEnrichmentHttpParameters' :: Maybe (HashMap Text (Sensitive Text))
headerParameters = Maybe (HashMap Text (Sensitive Text))
a} :: PipeEnrichmentHttpParameters) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pipeEnrichmentHttpParameters_pathParameterValues :: Lens.Lens' PipeEnrichmentHttpParameters (Prelude.Maybe [Prelude.Text])
pipeEnrichmentHttpParameters_pathParameterValues :: Lens' PipeEnrichmentHttpParameters (Maybe [Text])
pipeEnrichmentHttpParameters_pathParameterValues = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipeEnrichmentHttpParameters' {Maybe [Sensitive Text]
pathParameterValues :: Maybe [Sensitive Text]
$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters -> Maybe [Sensitive Text]
pathParameterValues} -> Maybe [Sensitive Text]
pathParameterValues) (\s :: PipeEnrichmentHttpParameters
s@PipeEnrichmentHttpParameters' {} Maybe [Sensitive Text]
a -> PipeEnrichmentHttpParameters
s {$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: Maybe [Sensitive Text]
pathParameterValues = Maybe [Sensitive Text]
a} :: PipeEnrichmentHttpParameters) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
pipeEnrichmentHttpParameters_queryStringParameters :: Lens.Lens' PipeEnrichmentHttpParameters (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
pipeEnrichmentHttpParameters_queryStringParameters :: Lens' PipeEnrichmentHttpParameters (Maybe (HashMap Text Text))
pipeEnrichmentHttpParameters_queryStringParameters = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\PipeEnrichmentHttpParameters' {Maybe (HashMap Text (Sensitive Text))
queryStringParameters :: Maybe (HashMap Text (Sensitive Text))
$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
queryStringParameters} -> Maybe (HashMap Text (Sensitive Text))
queryStringParameters) (\s :: PipeEnrichmentHttpParameters
s@PipeEnrichmentHttpParameters' {} Maybe (HashMap Text (Sensitive Text))
a -> PipeEnrichmentHttpParameters
s {$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: Maybe (HashMap Text (Sensitive Text))
queryStringParameters = Maybe (HashMap Text (Sensitive Text))
a} :: PipeEnrichmentHttpParameters) forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. forall (f :: * -> *) (g :: * -> *) s t a b.
(Functor f, Functor g) =>
AnIso s t a b -> Iso (f s) (g t) (f a) (g b)
Lens.mapping forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
instance Data.FromJSON PipeEnrichmentHttpParameters where
parseJSON :: Value -> Parser PipeEnrichmentHttpParameters
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"PipeEnrichmentHttpParameters"
( \Object
x ->
Maybe (HashMap Text (Sensitive Text))
-> Maybe [Sensitive Text]
-> Maybe (HashMap Text (Sensitive Text))
-> PipeEnrichmentHttpParameters
PipeEnrichmentHttpParameters'
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"HeaderParameters"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"PathParameterValues"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> ( Object
x
forall a. FromJSON a => Object -> Key -> Parser (Maybe a)
Data..:? Key
"QueryStringParameters"
forall a. Parser (Maybe a) -> a -> Parser a
Data..!= forall a. Monoid a => a
Prelude.mempty
)
)
instance
Prelude.Hashable
PipeEnrichmentHttpParameters
where
hashWithSalt :: Int -> PipeEnrichmentHttpParameters -> Int
hashWithSalt Int
_salt PipeEnrichmentHttpParameters' {Maybe [Sensitive Text]
Maybe (HashMap Text (Sensitive Text))
queryStringParameters :: Maybe (HashMap Text (Sensitive Text))
pathParameterValues :: Maybe [Sensitive Text]
headerParameters :: Maybe (HashMap Text (Sensitive Text))
$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters -> Maybe [Sensitive Text]
$sel:headerParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (Sensitive Text))
headerParameters
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe [Sensitive Text]
pathParameterValues
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text (Sensitive Text))
queryStringParameters
instance Prelude.NFData PipeEnrichmentHttpParameters where
rnf :: PipeEnrichmentHttpParameters -> ()
rnf PipeEnrichmentHttpParameters' {Maybe [Sensitive Text]
Maybe (HashMap Text (Sensitive Text))
queryStringParameters :: Maybe (HashMap Text (Sensitive Text))
pathParameterValues :: Maybe [Sensitive Text]
headerParameters :: Maybe (HashMap Text (Sensitive Text))
$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters -> Maybe [Sensitive Text]
$sel:headerParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (Sensitive Text))
headerParameters
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe [Sensitive Text]
pathParameterValues
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text (Sensitive Text))
queryStringParameters
instance Data.ToJSON PipeEnrichmentHttpParameters where
toJSON :: PipeEnrichmentHttpParameters -> Value
toJSON PipeEnrichmentHttpParameters' {Maybe [Sensitive Text]
Maybe (HashMap Text (Sensitive Text))
queryStringParameters :: Maybe (HashMap Text (Sensitive Text))
pathParameterValues :: Maybe [Sensitive Text]
headerParameters :: Maybe (HashMap Text (Sensitive Text))
$sel:queryStringParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
$sel:pathParameterValues:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters -> Maybe [Sensitive Text]
$sel:headerParameters:PipeEnrichmentHttpParameters' :: PipeEnrichmentHttpParameters
-> Maybe (HashMap Text (Sensitive Text))
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"HeaderParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (Sensitive Text))
headerParameters,
(Key
"PathParameterValues" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe [Sensitive Text]
pathParameterValues,
(Key
"QueryStringParameters" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..=)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text (Sensitive Text))
queryStringParameters
]
)