{-# 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.Core.Lens.Internal as Lens
import qualified Amazonka.Data as Data
import qualified Amazonka.Prelude as Prelude
data SamplingRuleUpdate = SamplingRuleUpdate'
{
SamplingRuleUpdate -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
SamplingRuleUpdate -> Maybe Double
fixedRate :: Prelude.Maybe Prelude.Double,
SamplingRuleUpdate -> Maybe Text
hTTPMethod :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
host :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Int
priority :: Prelude.Maybe Prelude.Int,
SamplingRuleUpdate -> Maybe Int
reservoirSize :: Prelude.Maybe Prelude.Int,
SamplingRuleUpdate -> Maybe Text
resourceARN :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
ruleARN :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
ruleName :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
serviceName :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
serviceType :: Prelude.Maybe Prelude.Text,
SamplingRuleUpdate -> Maybe Text
uRLPath :: Prelude.Maybe Prelude.Text
}
deriving (SamplingRuleUpdate -> SamplingRuleUpdate -> Bool
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]
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
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. 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'
{ $sel:attributes:SamplingRuleUpdate' :: Maybe (HashMap Text Text)
attributes = forall a. Maybe a
Prelude.Nothing,
$sel:fixedRate:SamplingRuleUpdate' :: Maybe Double
fixedRate = forall a. Maybe a
Prelude.Nothing,
$sel:hTTPMethod:SamplingRuleUpdate' :: Maybe Text
hTTPMethod = forall a. Maybe a
Prelude.Nothing,
$sel:host:SamplingRuleUpdate' :: Maybe Text
host = forall a. Maybe a
Prelude.Nothing,
$sel:priority:SamplingRuleUpdate' :: Maybe Int
priority = forall a. Maybe a
Prelude.Nothing,
$sel:reservoirSize:SamplingRuleUpdate' :: Maybe Int
reservoirSize = forall a. Maybe a
Prelude.Nothing,
$sel:resourceARN:SamplingRuleUpdate' :: Maybe Text
resourceARN = forall a. Maybe a
Prelude.Nothing,
$sel:ruleARN:SamplingRuleUpdate' :: Maybe Text
ruleARN = forall a. Maybe a
Prelude.Nothing,
$sel:ruleName:SamplingRuleUpdate' :: Maybe Text
ruleName = forall a. Maybe a
Prelude.Nothing,
$sel:serviceName:SamplingRuleUpdate' :: Maybe Text
serviceName = forall a. Maybe a
Prelude.Nothing,
$sel:serviceType:SamplingRuleUpdate' :: Maybe Text
serviceType = forall a. Maybe a
Prelude.Nothing,
$sel:uRLPath:SamplingRuleUpdate' :: Maybe Text
uRLPath = forall a. Maybe a
Prelude.Nothing
}
samplingRuleUpdate_attributes :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
samplingRuleUpdate_attributes :: Lens' SamplingRuleUpdate (Maybe (HashMap Text Text))
samplingRuleUpdate_attributes = 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) 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
samplingRuleUpdate_fixedRate :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Double)
samplingRuleUpdate_fixedRate :: Lens' SamplingRuleUpdate (Maybe Double)
samplingRuleUpdate_fixedRate = 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_hTTPMethod :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_hTTPMethod :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_hTTPMethod = 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_host :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_host :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_host = 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_priority :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Int)
samplingRuleUpdate_priority :: Lens' SamplingRuleUpdate (Maybe Int)
samplingRuleUpdate_priority = 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_reservoirSize :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Int)
samplingRuleUpdate_reservoirSize :: Lens' SamplingRuleUpdate (Maybe Int)
samplingRuleUpdate_reservoirSize = 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_resourceARN :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_resourceARN :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_resourceARN = 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_ruleARN :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_ruleARN :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_ruleARN = 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_ruleName :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_ruleName :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_ruleName = 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_serviceName :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_serviceName :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_serviceName = 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 :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_serviceType = 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_uRLPath :: Lens.Lens' SamplingRuleUpdate (Prelude.Maybe Prelude.Text)
samplingRuleUpdate_uRLPath :: Lens' SamplingRuleUpdate (Maybe Text)
samplingRuleUpdate_uRLPath = 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 where
hashWithSalt :: Int -> SamplingRuleUpdate -> Int
hashWithSalt Int
_salt SamplingRuleUpdate' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
uRLPath :: Maybe Text
serviceType :: Maybe Text
serviceName :: Maybe Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
resourceARN :: Maybe Text
reservoirSize :: Maybe Int
priority :: Maybe Int
host :: Maybe Text
hTTPMethod :: Maybe Text
fixedRate :: Maybe Double
attributes :: Maybe (HashMap Text Text)
$sel:uRLPath:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceType:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:resourceARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:reservoirSize:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:priority:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:host:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:hTTPMethod:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:fixedRate:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Double
$sel:attributes:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe (HashMap Text Text)
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe (HashMap Text Text)
attributes
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Double
fixedRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
hTTPMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
host
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Int
reservoirSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
resourceARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
serviceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
uRLPath
instance Prelude.NFData SamplingRuleUpdate where
rnf :: SamplingRuleUpdate -> ()
rnf SamplingRuleUpdate' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
uRLPath :: Maybe Text
serviceType :: Maybe Text
serviceName :: Maybe Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
resourceARN :: Maybe Text
reservoirSize :: Maybe Int
priority :: Maybe Int
host :: Maybe Text
hTTPMethod :: Maybe Text
fixedRate :: Maybe Double
attributes :: Maybe (HashMap Text Text)
$sel:uRLPath:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceType:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:resourceARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:reservoirSize:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:priority:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:host:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:hTTPMethod:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:fixedRate:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Double
$sel:attributes:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe (HashMap Text Text)
..} =
forall a. NFData a => a -> ()
Prelude.rnf Maybe (HashMap Text Text)
attributes
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Double
fixedRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
hTTPMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
host
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Int
reservoirSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
resourceARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ruleARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
ruleName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
serviceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Maybe Text
uRLPath
instance Data.ToJSON SamplingRuleUpdate where
toJSON :: SamplingRuleUpdate -> Value
toJSON SamplingRuleUpdate' {Maybe Double
Maybe Int
Maybe Text
Maybe (HashMap Text Text)
uRLPath :: Maybe Text
serviceType :: Maybe Text
serviceName :: Maybe Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
resourceARN :: Maybe Text
reservoirSize :: Maybe Int
priority :: Maybe Int
host :: Maybe Text
hTTPMethod :: Maybe Text
fixedRate :: Maybe Double
attributes :: Maybe (HashMap Text Text)
$sel:uRLPath:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceType:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:serviceName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleName:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:ruleARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:resourceARN:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:reservoirSize:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:priority:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Int
$sel:host:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:hTTPMethod:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Text
$sel:fixedRate:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe Double
$sel:attributes:SamplingRuleUpdate' :: SamplingRuleUpdate -> Maybe (HashMap Text Text)
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Key
"Attributes" 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 Text)
attributes,
(Key
"FixedRate" 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 Double
fixedRate,
(Key
"HTTPMethod" 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 Text
hTTPMethod,
(Key
"Host" 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 Text
host,
(Key
"Priority" 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 Int
priority,
(Key
"ReservoirSize" 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 Int
reservoirSize,
(Key
"ResourceARN" 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 Text
resourceARN,
(Key
"RuleARN" 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 Text
ruleARN,
(Key
"RuleName" 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 Text
ruleName,
(Key
"ServiceName" 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 Text
serviceName,
(Key
"ServiceType" 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 Text
serviceType,
(Key
"URLPath" 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 Text
uRLPath
]
)