{-# 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.XRay.Types.SamplingRuleUpdate where
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
data SamplingRuleUpdate = SamplingRuleUpdate'
{
SamplingRuleUpdate -> Maybe Text
hTTPMethod :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
SamplingRuleUpdate -> Maybe Text
ruleName :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Int
reservoirSize :: Prelude.Maybe Prelude.Int,
SamplingRuleUpdate -> Maybe Double
fixedRate :: Prelude.Maybe Prelude.Double,
SamplingRuleUpdate -> Maybe Text
resourceARN :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
SamplingRuleUpdate -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
serviceType :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
host :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
ruleARN :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
uRLPath :: Prelude.Maybe Prelude.Text
}
deriving (SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
(SamplingRuleUpdate -> SamplingRuleUpdate -> Bool)
-> (SamplingRuleUpdate -> SamplingRuleUpdate -> Bool)
-> Eq SamplingRuleUpdate
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
$c/= :: SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
== :: SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
$c== :: SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
Prelude.Eq, ReadPrec [SamplingRuleUpdate]
ReadPrec SamplingRuleUpdate
Int -> ReadS SamplingRuleUpdate
ReadS [SamplingRuleUpdate]
(Int -> ReadS SamplingRuleUpdate)
-> ReadS [SamplingRuleUpdate]
-> ReadPrec SamplingRuleUpdate
-> ReadPrec [SamplingRuleUpdate]
-> Read SamplingRuleUpdate
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SamplingRuleUpdate]
$creadListPrec :: ReadPrec [SamplingRuleUpdate]
readPrec :: ReadPrec SamplingRuleUpdate
$creadPrec :: ReadPrec SamplingRuleUpdate
readList :: ReadS [SamplingRuleUpdate]
$creadList :: ReadS [SamplingRuleUpdate]
readsPrec :: Int -> ReadS SamplingRuleUpdate
$creadsPrec :: Int -> ReadS SamplingRuleUpdate
Prelude.Read, Int -> SamplingRuleUpdate -> ShowS
[SamplingRuleUpdate] -> ShowS
SamplingRuleUpdate -> String
(Int -> SamplingRuleUpdate -> ShowS)
-> (SamplingRuleUpdate -> String)
-> ([SamplingRuleUpdate] -> ShowS)
-> Show SamplingRuleUpdate
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SamplingRuleUpdate] -> ShowS
$cshowList :: [SamplingRuleUpdate] -> ShowS
show :: SamplingRuleUpdate -> String
$cshow :: SamplingRuleUpdate -> String
showsPrec :: Int -> SamplingRuleUpdate -> ShowS
$cshowsPrec :: Int -> SamplingRuleUpdate -> ShowS
Prelude.Show, (forall x. SamplingRuleUpdate -> Rep SamplingRuleUpdate x)
-> (forall x. Rep SamplingRuleUpdate x -> SamplingRuleUpdate)
-> Generic SamplingRuleUpdate
forall x. Rep SamplingRuleUpdate x -> SamplingRuleUpdate
forall x. SamplingRuleUpdate -> Rep SamplingRuleUpdate x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SamplingRuleUpdate x -> SamplingRuleUpdate
$cfrom :: forall x. SamplingRuleUpdate -> Rep SamplingRuleUpdate x
Prelude.Generic)
newSamplingRuleUpdate ::
SamplingRuleUpdate
newSamplingRuleUpdate :: SamplingRuleUpdate
newSamplingRuleUpdate =
SamplingRuleUpdate' :: Maybe Text
-> Maybe Int
-> Maybe Text
-> Maybe Int
-> Maybe Double
-> Maybe Text
-> Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> SamplingRuleUpdate
SamplingRuleUpdate'
{ $sel:hTTPMethod:SamplingRuleUpdate' :: Maybe Text
hTTPMethod = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:priority:SamplingRuleUpdate' :: Maybe Int
priority = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:ruleName:SamplingRuleUpdate' :: Maybe Text
ruleName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:reservoirSize:SamplingRuleUpdate' :: Maybe Int
reservoirSize = Maybe Int
forall a. Maybe a
Prelude.Nothing,
$sel:fixedRate:SamplingRuleUpdate' :: Maybe Double
fixedRate = Maybe Double
forall a. Maybe a
Prelude.Nothing,
$sel:resourceARN:SamplingRuleUpdate' :: Maybe Text
resourceARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:attributes:SamplingRuleUpdate' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:SamplingRuleUpdate' :: Maybe Text
serviceName = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:serviceType:SamplingRuleUpdate' :: Maybe Text
serviceType = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:host:SamplingRuleUpdate' :: Maybe Text
host = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:ruleARN:SamplingRuleUpdate' :: Maybe Text
ruleARN = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:uRLPath:SamplingRuleUpdate' :: Maybe Text
uRLPath = Maybe Text
forall a. Maybe a
Prelude.Nothing
}
samplingRuleUpdate_hTTPMethod :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_hTTPMethod :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_hTTPMethod = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
hTTPMethod :: Maybe Text
$sel:hTTPMethod:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
hTTPMethod} -> Maybe Text
hTTPMethod) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:hTTPMethod:SamplingRuleUpdate' :: Maybe Text
hTTPMethod = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_priority :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Int)
samplingRuleUpdate_priority :: (Maybe Int -> f (Maybe Int))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_priority = (SamplingRuleUpdate -> Maybe Int)
-> (SamplingRuleUpdate -> Maybe Int -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Int
priority :: Maybe Int
$sel:priority:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
priority} -> Maybe Int
priority) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Int
a -> SamplingRuleUpdate
s {$sel:priority:SamplingRuleUpdate' :: Maybe Int
priority = Maybe Int
a} :: SamplingRuleUpdate)
samplingRuleUpdate_ruleName :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_ruleName :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_ruleName = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
ruleName :: Maybe Text
$sel:ruleName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
ruleName} -> Maybe Text
ruleName) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:ruleName:SamplingRuleUpdate' :: Maybe Text
ruleName = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_reservoirSize :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Int)
samplingRuleUpdate_reservoirSize :: (Maybe Int -> f (Maybe Int))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_reservoirSize = (SamplingRuleUpdate -> Maybe Int)
-> (SamplingRuleUpdate -> Maybe Int -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Int) (Maybe Int)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Int
reservoirSize :: Maybe Int
$sel:reservoirSize:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
reservoirSize} -> Maybe Int
reservoirSize) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Int
a -> SamplingRuleUpdate
s {$sel:reservoirSize:SamplingRuleUpdate' :: Maybe Int
reservoirSize = Maybe Int
a} :: SamplingRuleUpdate)
samplingRuleUpdate_fixedRate :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Double)
samplingRuleUpdate_fixedRate :: (Maybe Double -> f (Maybe Double))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_fixedRate = (SamplingRuleUpdate -> Maybe Double)
-> (SamplingRuleUpdate -> Maybe Double -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Double) (Maybe Double)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Double
fixedRate :: Maybe Double
$sel:fixedRate:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Double
fixedRate} -> Maybe Double
fixedRate) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Double
a -> SamplingRuleUpdate
s {$sel:fixedRate:SamplingRuleUpdate' :: Maybe Double
fixedRate = Maybe Double
a} :: SamplingRuleUpdate)
samplingRuleUpdate_resourceARN :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_resourceARN :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_resourceARN = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
resourceARN :: Maybe Text
$sel:resourceARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
resourceARN} -> Maybe Text
resourceARN) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:resourceARN:SamplingRuleUpdate' :: Maybe Text
resourceARN = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_attributes :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
samplingRuleUpdate_attributes :: (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_attributes = (SamplingRuleUpdate -> Maybe (HashMap Text Text))
-> (SamplingRuleUpdate
-> Maybe (HashMap Text Text) -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate
SamplingRuleUpdate
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe (HashMap Text Text)
a -> SamplingRuleUpdate
s {$sel:attributes:SamplingRuleUpdate' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: SamplingRuleUpdate) ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SamplingRuleUpdate -> f SamplingRuleUpdate)
-> ((Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> (Maybe (HashMap Text Text) -> f (Maybe (HashMap Text Text)))
-> SamplingRuleUpdate
-> f SamplingRuleUpdate
forall b c a. (b -> c) -> (a -> b) -> a -> c
Prelude.. AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
-> Iso
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
(Maybe (HashMap Text Text))
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 AnIso
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
(HashMap Text Text)
forall s t a b. (Coercible s a, Coercible t b) => Iso s t a b
Lens.coerced
samplingRuleUpdate_serviceName :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_serviceName :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_serviceName = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
serviceName :: Maybe Text
$sel:serviceName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
serviceName} -> Maybe Text
serviceName) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:serviceName:SamplingRuleUpdate' :: Maybe Text
serviceName = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_serviceType :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_serviceType :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_serviceType = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
serviceType :: Maybe Text
$sel:serviceType:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
serviceType} -> Maybe Text
serviceType) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:serviceType:SamplingRuleUpdate' :: Maybe Text
serviceType = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_host :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_host :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_host = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
host :: Maybe Text
$sel:host:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
host} -> Maybe Text
host) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:host:SamplingRuleUpdate' :: Maybe Text
host = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_ruleARN :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_ruleARN :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_ruleARN = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
ruleARN :: Maybe Text
$sel:ruleARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
ruleARN} -> Maybe Text
ruleARN) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:ruleARN:SamplingRuleUpdate' :: Maybe Text
ruleARN = Maybe Text
a} :: SamplingRuleUpdate)
samplingRuleUpdate_uRLPath :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_uRLPath :: (Maybe Text -> f (Maybe Text))
-> SamplingRuleUpdate -> f SamplingRuleUpdate
samplingRuleUpdate_uRLPath = (SamplingRuleUpdate -> Maybe Text)
-> (SamplingRuleUpdate -> Maybe Text -> SamplingRuleUpdate)
-> Lens
SamplingRuleUpdate SamplingRuleUpdate (Maybe Text) (Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRuleUpdate' {Maybe Text
uRLPath :: Maybe Text
$sel:uRLPath:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
uRLPath} -> Maybe Text
uRLPath) (\s :: SamplingRuleUpdate
s@SamplingRuleUpdate' {} Maybe Text
a -> SamplingRuleUpdate
s {$sel:uRLPath:SamplingRuleUpdate' :: Maybe Text
uRLPath = Maybe Text
a} :: SamplingRuleUpdate)
instance Prelude.Hashable SamplingRuleUpdate
instance Prelude.NFData SamplingRuleUpdate
instance Core.ToJSON SamplingRuleUpdate where
toJSON :: SamplingRuleUpdate -> Value
toJSON SamplingRuleUpdate' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
uRLPath :: Maybe Text
ruleARN :: Maybe Text
host :: Maybe Text
serviceType :: Maybe Text
serviceName :: Maybe Text
attributes :: Maybe (HashMap Text Text)
resourceARN :: Maybe Text
fixedRate :: Maybe Double
reservoirSize :: Maybe Int
ruleName :: Maybe Text
priority :: Maybe Int
hTTPMethod :: Maybe Text
$sel:uRLPath:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:host:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceType:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:attributes:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe (HashMap Text Text)
$sel:resourceARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:fixedRate:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Double
$sel:reservoirSize:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:ruleName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:priority:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:hTTPMethod:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"HTTPMethod" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
hTTPMethod,
(Text
"Priority" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
priority,
(Text
"RuleName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ruleName,
(Text
"ReservoirSize" Text -> Int -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Int -> Pair) -> Maybe Int -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Int
reservoirSize,
(Text
"FixedRate" Text -> Double -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Double -> Pair) -> Maybe Double -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Double
fixedRate,
(Text
"ResourceARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
resourceARN,
(Text
"Attributes" Text -> HashMap Text Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (HashMap Text Text -> Pair)
-> Maybe (HashMap Text Text) -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe (HashMap Text Text)
attributes,
(Text
"ServiceName" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceName,
(Text
"ServiceType" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
serviceType,
(Text
"Host" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
host,
(Text
"RuleARN" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
ruleARN,
(Text
"URLPath" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
uRLPath
]
)