{-# 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.SamplingRule 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 SamplingRule = SamplingRule'
{
SamplingRule -> Maybe (HashMap Text Text)
attributes :: Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text),
SamplingRule -> Maybe Text
ruleARN :: Prelude.Maybe Prelude.Text,
SamplingRule -> Maybe Text
ruleName :: Prelude.Maybe Prelude.Text,
SamplingRule -> Text
resourceARN :: Prelude.Text,
SamplingRule -> Natural
priority :: Prelude.Natural,
SamplingRule -> Double
fixedRate :: Prelude.Double,
SamplingRule -> Natural
reservoirSize :: Prelude.Natural,
SamplingRule -> Text
serviceName :: Prelude.Text,
SamplingRule -> Text
serviceType :: Prelude.Text,
SamplingRule -> Text
host :: Prelude.Text,
SamplingRule -> Text
hTTPMethod :: Prelude.Text,
SamplingRule -> Text
uRLPath :: Prelude.Text,
SamplingRule -> Natural
version :: Prelude.Natural
}
deriving (SamplingRule -> SamplingRule -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplingRule -> SamplingRule -> Bool
$c/= :: SamplingRule -> SamplingRule -> Bool
== :: SamplingRule -> SamplingRule -> Bool
$c== :: SamplingRule -> SamplingRule -> Bool
Prelude.Eq, ReadPrec [SamplingRule]
ReadPrec SamplingRule
Int -> ReadS SamplingRule
ReadS [SamplingRule]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SamplingRule]
$creadListPrec :: ReadPrec [SamplingRule]
readPrec :: ReadPrec SamplingRule
$creadPrec :: ReadPrec SamplingRule
readList :: ReadS [SamplingRule]
$creadList :: ReadS [SamplingRule]
readsPrec :: Int -> ReadS SamplingRule
$creadsPrec :: Int -> ReadS SamplingRule
Prelude.Read, Int -> SamplingRule -> ShowS
[SamplingRule] -> ShowS
SamplingRule -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SamplingRule] -> ShowS
$cshowList :: [SamplingRule] -> ShowS
show :: SamplingRule -> String
$cshow :: SamplingRule -> String
showsPrec :: Int -> SamplingRule -> ShowS
$cshowsPrec :: Int -> SamplingRule -> ShowS
Prelude.Show, forall x. Rep SamplingRule x -> SamplingRule
forall x. SamplingRule -> Rep SamplingRule x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SamplingRule x -> SamplingRule
$cfrom :: forall x. SamplingRule -> Rep SamplingRule x
Prelude.Generic)
newSamplingRule ::
Prelude.Text ->
Prelude.Natural ->
Prelude.Double ->
Prelude.Natural ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
Prelude.Natural ->
SamplingRule
newSamplingRule :: Text
-> Natural
-> Double
-> Natural
-> Text
-> Text
-> Text
-> Text
-> Text
-> Natural
-> SamplingRule
newSamplingRule
Text
pResourceARN_
Natural
pPriority_
Double
pFixedRate_
Natural
pReservoirSize_
Text
pServiceName_
Text
pServiceType_
Text
pHost_
Text
pHTTPMethod_
Text
pURLPath_
Natural
pVersion_ =
SamplingRule'
{ $sel:attributes:SamplingRule' :: Maybe (HashMap Text Text)
attributes = forall a. Maybe a
Prelude.Nothing,
$sel:ruleARN:SamplingRule' :: Maybe Text
ruleARN = forall a. Maybe a
Prelude.Nothing,
$sel:ruleName:SamplingRule' :: Maybe Text
ruleName = forall a. Maybe a
Prelude.Nothing,
$sel:resourceARN:SamplingRule' :: Text
resourceARN = Text
pResourceARN_,
$sel:priority:SamplingRule' :: Natural
priority = Natural
pPriority_,
$sel:fixedRate:SamplingRule' :: Double
fixedRate = Double
pFixedRate_,
$sel:reservoirSize:SamplingRule' :: Natural
reservoirSize = Natural
pReservoirSize_,
$sel:serviceName:SamplingRule' :: Text
serviceName = Text
pServiceName_,
$sel:serviceType:SamplingRule' :: Text
serviceType = Text
pServiceType_,
$sel:host:SamplingRule' :: Text
host = Text
pHost_,
$sel:hTTPMethod:SamplingRule' :: Text
hTTPMethod = Text
pHTTPMethod_,
$sel:uRLPath:SamplingRule' :: Text
uRLPath = Text
pURLPath_,
$sel:version:SamplingRule' :: Natural
version = Natural
pVersion_
}
samplingRule_attributes :: Lens.Lens' SamplingRule (Prelude.Maybe (Prelude.HashMap Prelude.Text Prelude.Text))
samplingRule_attributes :: Lens' SamplingRule (Maybe (HashMap Text Text))
samplingRule_attributes = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Maybe (HashMap Text Text)
attributes :: Maybe (HashMap Text Text)
$sel:attributes:SamplingRule' :: SamplingRule -> Maybe (HashMap Text Text)
attributes} -> Maybe (HashMap Text Text)
attributes) (\s :: SamplingRule
s@SamplingRule' {} Maybe (HashMap Text Text)
a -> SamplingRule
s {$sel:attributes:SamplingRule' :: Maybe (HashMap Text Text)
attributes = Maybe (HashMap Text Text)
a} :: SamplingRule) 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
samplingRule_ruleARN :: Lens.Lens' SamplingRule (Prelude.Maybe Prelude.Text)
samplingRule_ruleARN :: Lens' SamplingRule (Maybe Text)
samplingRule_ruleARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Maybe Text
ruleARN :: Maybe Text
$sel:ruleARN:SamplingRule' :: SamplingRule -> Maybe Text
ruleARN} -> Maybe Text
ruleARN) (\s :: SamplingRule
s@SamplingRule' {} Maybe Text
a -> SamplingRule
s {$sel:ruleARN:SamplingRule' :: Maybe Text
ruleARN = Maybe Text
a} :: SamplingRule)
samplingRule_ruleName :: Lens.Lens' SamplingRule (Prelude.Maybe Prelude.Text)
samplingRule_ruleName :: Lens' SamplingRule (Maybe Text)
samplingRule_ruleName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Maybe Text
ruleName :: Maybe Text
$sel:ruleName:SamplingRule' :: SamplingRule -> Maybe Text
ruleName} -> Maybe Text
ruleName) (\s :: SamplingRule
s@SamplingRule' {} Maybe Text
a -> SamplingRule
s {$sel:ruleName:SamplingRule' :: Maybe Text
ruleName = Maybe Text
a} :: SamplingRule)
samplingRule_resourceARN :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_resourceARN :: Lens' SamplingRule Text
samplingRule_resourceARN = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
resourceARN :: Text
$sel:resourceARN:SamplingRule' :: SamplingRule -> Text
resourceARN} -> Text
resourceARN) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:resourceARN:SamplingRule' :: Text
resourceARN = Text
a} :: SamplingRule)
samplingRule_priority :: Lens.Lens' SamplingRule Prelude.Natural
samplingRule_priority :: Lens' SamplingRule Natural
samplingRule_priority = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Natural
priority :: Natural
$sel:priority:SamplingRule' :: SamplingRule -> Natural
priority} -> Natural
priority) (\s :: SamplingRule
s@SamplingRule' {} Natural
a -> SamplingRule
s {$sel:priority:SamplingRule' :: Natural
priority = Natural
a} :: SamplingRule)
samplingRule_fixedRate :: Lens.Lens' SamplingRule Prelude.Double
samplingRule_fixedRate :: Lens' SamplingRule Double
samplingRule_fixedRate = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Double
fixedRate :: Double
$sel:fixedRate:SamplingRule' :: SamplingRule -> Double
fixedRate} -> Double
fixedRate) (\s :: SamplingRule
s@SamplingRule' {} Double
a -> SamplingRule
s {$sel:fixedRate:SamplingRule' :: Double
fixedRate = Double
a} :: SamplingRule)
samplingRule_reservoirSize :: Lens.Lens' SamplingRule Prelude.Natural
samplingRule_reservoirSize :: Lens' SamplingRule Natural
samplingRule_reservoirSize = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Natural
reservoirSize :: Natural
$sel:reservoirSize:SamplingRule' :: SamplingRule -> Natural
reservoirSize} -> Natural
reservoirSize) (\s :: SamplingRule
s@SamplingRule' {} Natural
a -> SamplingRule
s {$sel:reservoirSize:SamplingRule' :: Natural
reservoirSize = Natural
a} :: SamplingRule)
samplingRule_serviceName :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_serviceName :: Lens' SamplingRule Text
samplingRule_serviceName = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
serviceName :: Text
$sel:serviceName:SamplingRule' :: SamplingRule -> Text
serviceName} -> Text
serviceName) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:serviceName:SamplingRule' :: Text
serviceName = Text
a} :: SamplingRule)
samplingRule_serviceType :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_serviceType :: Lens' SamplingRule Text
samplingRule_serviceType = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
serviceType :: Text
$sel:serviceType:SamplingRule' :: SamplingRule -> Text
serviceType} -> Text
serviceType) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:serviceType:SamplingRule' :: Text
serviceType = Text
a} :: SamplingRule)
samplingRule_host :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_host :: Lens' SamplingRule Text
samplingRule_host = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
host :: Text
$sel:host:SamplingRule' :: SamplingRule -> Text
host} -> Text
host) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:host:SamplingRule' :: Text
host = Text
a} :: SamplingRule)
samplingRule_hTTPMethod :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_hTTPMethod :: Lens' SamplingRule Text
samplingRule_hTTPMethod = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
hTTPMethod :: Text
$sel:hTTPMethod:SamplingRule' :: SamplingRule -> Text
hTTPMethod} -> Text
hTTPMethod) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:hTTPMethod:SamplingRule' :: Text
hTTPMethod = Text
a} :: SamplingRule)
samplingRule_uRLPath :: Lens.Lens' SamplingRule Prelude.Text
samplingRule_uRLPath :: Lens' SamplingRule Text
samplingRule_uRLPath = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Text
uRLPath :: Text
$sel:uRLPath:SamplingRule' :: SamplingRule -> Text
uRLPath} -> Text
uRLPath) (\s :: SamplingRule
s@SamplingRule' {} Text
a -> SamplingRule
s {$sel:uRLPath:SamplingRule' :: Text
uRLPath = Text
a} :: SamplingRule)
samplingRule_version :: Lens.Lens' SamplingRule Prelude.Natural
samplingRule_version :: Lens' SamplingRule Natural
samplingRule_version = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\SamplingRule' {Natural
version :: Natural
$sel:version:SamplingRule' :: SamplingRule -> Natural
version} -> Natural
version) (\s :: SamplingRule
s@SamplingRule' {} Natural
a -> SamplingRule
s {$sel:version:SamplingRule' :: Natural
version = Natural
a} :: SamplingRule)
instance Data.FromJSON SamplingRule where
parseJSON :: Value -> Parser SamplingRule
parseJSON =
forall a. String -> (Object -> Parser a) -> Value -> Parser a
Data.withObject
String
"SamplingRule"
( \Object
x ->
Maybe (HashMap Text Text)
-> Maybe Text
-> Maybe Text
-> Text
-> Natural
-> Double
-> Natural
-> Text
-> Text
-> Text
-> Text
-> Text
-> Natural
-> SamplingRule
SamplingRule'
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
"Attributes" 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
"RuleARN")
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
"RuleName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ResourceARN")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Priority")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"FixedRate")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ReservoirSize")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ServiceName")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"ServiceType")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Host")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"HTTPMethod")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"URLPath")
forall (f :: * -> *) a b. Applicative f => f (a -> b) -> f a -> f b
Prelude.<*> (Object
x forall a. FromJSON a => Object -> Key -> Parser a
Data..: Key
"Version")
)
instance Prelude.Hashable SamplingRule where
hashWithSalt :: Int -> SamplingRule -> Int
hashWithSalt Int
_salt SamplingRule' {Double
Natural
Maybe Text
Maybe (HashMap Text Text)
Text
version :: Natural
uRLPath :: Text
hTTPMethod :: Text
host :: Text
serviceType :: Text
serviceName :: Text
reservoirSize :: Natural
fixedRate :: Double
priority :: Natural
resourceARN :: Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:version:SamplingRule' :: SamplingRule -> Natural
$sel:uRLPath:SamplingRule' :: SamplingRule -> Text
$sel:hTTPMethod:SamplingRule' :: SamplingRule -> Text
$sel:host:SamplingRule' :: SamplingRule -> Text
$sel:serviceType:SamplingRule' :: SamplingRule -> Text
$sel:serviceName:SamplingRule' :: SamplingRule -> Text
$sel:reservoirSize:SamplingRule' :: SamplingRule -> Natural
$sel:fixedRate:SamplingRule' :: SamplingRule -> Double
$sel:priority:SamplingRule' :: SamplingRule -> Natural
$sel:resourceARN:SamplingRule' :: SamplingRule -> Text
$sel:ruleName:SamplingRule' :: SamplingRule -> Maybe Text
$sel:ruleARN:SamplingRule' :: SamplingRule -> Maybe Text
$sel:attributes:SamplingRule' :: SamplingRule -> 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 Text
ruleARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Maybe Text
ruleName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
resourceARN
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
priority
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Double
fixedRate
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
reservoirSize
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceName
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
serviceType
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
host
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hTTPMethod
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
uRLPath
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Natural
version
instance Prelude.NFData SamplingRule where
rnf :: SamplingRule -> ()
rnf SamplingRule' {Double
Natural
Maybe Text
Maybe (HashMap Text Text)
Text
version :: Natural
uRLPath :: Text
hTTPMethod :: Text
host :: Text
serviceType :: Text
serviceName :: Text
reservoirSize :: Natural
fixedRate :: Double
priority :: Natural
resourceARN :: Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:version:SamplingRule' :: SamplingRule -> Natural
$sel:uRLPath:SamplingRule' :: SamplingRule -> Text
$sel:hTTPMethod:SamplingRule' :: SamplingRule -> Text
$sel:host:SamplingRule' :: SamplingRule -> Text
$sel:serviceType:SamplingRule' :: SamplingRule -> Text
$sel:serviceName:SamplingRule' :: SamplingRule -> Text
$sel:reservoirSize:SamplingRule' :: SamplingRule -> Natural
$sel:fixedRate:SamplingRule' :: SamplingRule -> Double
$sel:priority:SamplingRule' :: SamplingRule -> Natural
$sel:resourceARN:SamplingRule' :: SamplingRule -> Text
$sel:ruleName:SamplingRule' :: SamplingRule -> Maybe Text
$sel:ruleARN:SamplingRule' :: SamplingRule -> Maybe Text
$sel:attributes:SamplingRule' :: SamplingRule -> 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 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 Text
resourceARN
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
priority
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Double
fixedRate
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
reservoirSize
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceName
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
serviceType
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
host
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hTTPMethod
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
uRLPath
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Natural
version
instance Data.ToJSON SamplingRule where
toJSON :: SamplingRule -> Value
toJSON SamplingRule' {Double
Natural
Maybe Text
Maybe (HashMap Text Text)
Text
version :: Natural
uRLPath :: Text
hTTPMethod :: Text
host :: Text
serviceType :: Text
serviceName :: Text
reservoirSize :: Natural
fixedRate :: Double
priority :: Natural
resourceARN :: Text
ruleName :: Maybe Text
ruleARN :: Maybe Text
attributes :: Maybe (HashMap Text Text)
$sel:version:SamplingRule' :: SamplingRule -> Natural
$sel:uRLPath:SamplingRule' :: SamplingRule -> Text
$sel:hTTPMethod:SamplingRule' :: SamplingRule -> Text
$sel:host:SamplingRule' :: SamplingRule -> Text
$sel:serviceType:SamplingRule' :: SamplingRule -> Text
$sel:serviceName:SamplingRule' :: SamplingRule -> Text
$sel:reservoirSize:SamplingRule' :: SamplingRule -> Natural
$sel:fixedRate:SamplingRule' :: SamplingRule -> Double
$sel:priority:SamplingRule' :: SamplingRule -> Natural
$sel:resourceARN:SamplingRule' :: SamplingRule -> Text
$sel:ruleName:SamplingRule' :: SamplingRule -> Maybe Text
$sel:ruleARN:SamplingRule' :: SamplingRule -> Maybe Text
$sel:attributes:SamplingRule' :: SamplingRule -> 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
"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,
forall a. a -> Maybe a
Prelude.Just (Key
"ResourceARN" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
resourceARN),
forall a. a -> Maybe a
Prelude.Just (Key
"Priority" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
priority),
forall a. a -> Maybe a
Prelude.Just (Key
"FixedRate" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Double
fixedRate),
forall a. a -> Maybe a
Prelude.Just (Key
"ReservoirSize" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
reservoirSize),
forall a. a -> Maybe a
Prelude.Just (Key
"ServiceName" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceName),
forall a. a -> Maybe a
Prelude.Just (Key
"ServiceType" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
serviceType),
forall a. a -> Maybe a
Prelude.Just (Key
"Host" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
host),
forall a. a -> Maybe a
Prelude.Just (Key
"HTTPMethod" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hTTPMethod),
forall a. a -> Maybe a
Prelude.Just (Key
"URLPath" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
uRLPath),
forall a. a -> Maybe a
Prelude.Just (Key
"Version" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Natural
version)
]
)