{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}

-- Derived from AWS service descriptions, licensed under Apache 2.0.

-- |
-- Module      : Amazonka.XRay.Types.SamplingStrategyName
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.XRay.Types.SamplingStrategyName
  ( SamplingStrategyName
      ( ..,
        SamplingStrategyName_FixedRate,
        SamplingStrategyName_PartialScan
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Prelude as Prelude

newtype SamplingStrategyName = SamplingStrategyName'
  { SamplingStrategyName -> Text
fromSamplingStrategyName ::
      Core.Text
  }
  deriving stock
    ( Int -> SamplingStrategyName -> ShowS
[SamplingStrategyName] -> ShowS
SamplingStrategyName -> String
(Int -> SamplingStrategyName -> ShowS)
-> (SamplingStrategyName -> String)
-> ([SamplingStrategyName] -> ShowS)
-> Show SamplingStrategyName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SamplingStrategyName] -> ShowS
$cshowList :: [SamplingStrategyName] -> ShowS
show :: SamplingStrategyName -> String
$cshow :: SamplingStrategyName -> String
showsPrec :: Int -> SamplingStrategyName -> ShowS
$cshowsPrec :: Int -> SamplingStrategyName -> ShowS
Prelude.Show,
      ReadPrec [SamplingStrategyName]
ReadPrec SamplingStrategyName
Int -> ReadS SamplingStrategyName
ReadS [SamplingStrategyName]
(Int -> ReadS SamplingStrategyName)
-> ReadS [SamplingStrategyName]
-> ReadPrec SamplingStrategyName
-> ReadPrec [SamplingStrategyName]
-> Read SamplingStrategyName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [SamplingStrategyName]
$creadListPrec :: ReadPrec [SamplingStrategyName]
readPrec :: ReadPrec SamplingStrategyName
$creadPrec :: ReadPrec SamplingStrategyName
readList :: ReadS [SamplingStrategyName]
$creadList :: ReadS [SamplingStrategyName]
readsPrec :: Int -> ReadS SamplingStrategyName
$creadsPrec :: Int -> ReadS SamplingStrategyName
Prelude.Read,
      SamplingStrategyName -> SamplingStrategyName -> Bool
(SamplingStrategyName -> SamplingStrategyName -> Bool)
-> (SamplingStrategyName -> SamplingStrategyName -> Bool)
-> Eq SamplingStrategyName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c/= :: SamplingStrategyName -> SamplingStrategyName -> Bool
== :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c== :: SamplingStrategyName -> SamplingStrategyName -> Bool
Prelude.Eq,
      Eq SamplingStrategyName
Eq SamplingStrategyName
-> (SamplingStrategyName -> SamplingStrategyName -> Ordering)
-> (SamplingStrategyName -> SamplingStrategyName -> Bool)
-> (SamplingStrategyName -> SamplingStrategyName -> Bool)
-> (SamplingStrategyName -> SamplingStrategyName -> Bool)
-> (SamplingStrategyName -> SamplingStrategyName -> Bool)
-> (SamplingStrategyName
    -> SamplingStrategyName -> SamplingStrategyName)
-> (SamplingStrategyName
    -> SamplingStrategyName -> SamplingStrategyName)
-> Ord SamplingStrategyName
SamplingStrategyName -> SamplingStrategyName -> Bool
SamplingStrategyName -> SamplingStrategyName -> Ordering
SamplingStrategyName
-> SamplingStrategyName -> SamplingStrategyName
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: SamplingStrategyName
-> SamplingStrategyName -> SamplingStrategyName
$cmin :: SamplingStrategyName
-> SamplingStrategyName -> SamplingStrategyName
max :: SamplingStrategyName
-> SamplingStrategyName -> SamplingStrategyName
$cmax :: SamplingStrategyName
-> SamplingStrategyName -> SamplingStrategyName
>= :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c>= :: SamplingStrategyName -> SamplingStrategyName -> Bool
> :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c> :: SamplingStrategyName -> SamplingStrategyName -> Bool
<= :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c<= :: SamplingStrategyName -> SamplingStrategyName -> Bool
< :: SamplingStrategyName -> SamplingStrategyName -> Bool
$c< :: SamplingStrategyName -> SamplingStrategyName -> Bool
compare :: SamplingStrategyName -> SamplingStrategyName -> Ordering
$ccompare :: SamplingStrategyName -> SamplingStrategyName -> Ordering
$cp1Ord :: Eq SamplingStrategyName
Prelude.Ord,
      (forall x. SamplingStrategyName -> Rep SamplingStrategyName x)
-> (forall x. Rep SamplingStrategyName x -> SamplingStrategyName)
-> Generic SamplingStrategyName
forall x. Rep SamplingStrategyName x -> SamplingStrategyName
forall x. SamplingStrategyName -> Rep SamplingStrategyName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep SamplingStrategyName x -> SamplingStrategyName
$cfrom :: forall x. SamplingStrategyName -> Rep SamplingStrategyName x
Prelude.Generic
    )
  deriving newtype
    ( Int -> SamplingStrategyName -> Int
SamplingStrategyName -> Int
(Int -> SamplingStrategyName -> Int)
-> (SamplingStrategyName -> Int) -> Hashable SamplingStrategyName
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: SamplingStrategyName -> Int
$chash :: SamplingStrategyName -> Int
hashWithSalt :: Int -> SamplingStrategyName -> Int
$chashWithSalt :: Int -> SamplingStrategyName -> Int
Prelude.Hashable,
      SamplingStrategyName -> ()
(SamplingStrategyName -> ()) -> NFData SamplingStrategyName
forall a. (a -> ()) -> NFData a
rnf :: SamplingStrategyName -> ()
$crnf :: SamplingStrategyName -> ()
Prelude.NFData,
      Text -> Either String SamplingStrategyName
(Text -> Either String SamplingStrategyName)
-> FromText SamplingStrategyName
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String SamplingStrategyName
$cfromText :: Text -> Either String SamplingStrategyName
Core.FromText,
      SamplingStrategyName -> Text
(SamplingStrategyName -> Text) -> ToText SamplingStrategyName
forall a. (a -> Text) -> ToText a
toText :: SamplingStrategyName -> Text
$ctoText :: SamplingStrategyName -> Text
Core.ToText,
      SamplingStrategyName -> ByteString
(SamplingStrategyName -> ByteString)
-> ToByteString SamplingStrategyName
forall a. (a -> ByteString) -> ToByteString a
toBS :: SamplingStrategyName -> ByteString
$ctoBS :: SamplingStrategyName -> ByteString
Core.ToByteString,
      SamplingStrategyName -> ByteStringBuilder
(SamplingStrategyName -> ByteStringBuilder)
-> ToLog SamplingStrategyName
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: SamplingStrategyName -> ByteStringBuilder
$cbuild :: SamplingStrategyName -> ByteStringBuilder
Core.ToLog,
      HeaderName -> SamplingStrategyName -> [Header]
(HeaderName -> SamplingStrategyName -> [Header])
-> ToHeader SamplingStrategyName
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> SamplingStrategyName -> [Header]
$ctoHeader :: HeaderName -> SamplingStrategyName -> [Header]
Core.ToHeader,
      SamplingStrategyName -> QueryString
(SamplingStrategyName -> QueryString)
-> ToQuery SamplingStrategyName
forall a. (a -> QueryString) -> ToQuery a
toQuery :: SamplingStrategyName -> QueryString
$ctoQuery :: SamplingStrategyName -> QueryString
Core.ToQuery,
      Value -> Parser [SamplingStrategyName]
Value -> Parser SamplingStrategyName
(Value -> Parser SamplingStrategyName)
-> (Value -> Parser [SamplingStrategyName])
-> FromJSON SamplingStrategyName
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [SamplingStrategyName]
$cparseJSONList :: Value -> Parser [SamplingStrategyName]
parseJSON :: Value -> Parser SamplingStrategyName
$cparseJSON :: Value -> Parser SamplingStrategyName
Core.FromJSON,
      FromJSONKeyFunction [SamplingStrategyName]
FromJSONKeyFunction SamplingStrategyName
FromJSONKeyFunction SamplingStrategyName
-> FromJSONKeyFunction [SamplingStrategyName]
-> FromJSONKey SamplingStrategyName
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [SamplingStrategyName]
$cfromJSONKeyList :: FromJSONKeyFunction [SamplingStrategyName]
fromJSONKey :: FromJSONKeyFunction SamplingStrategyName
$cfromJSONKey :: FromJSONKeyFunction SamplingStrategyName
Core.FromJSONKey,
      [SamplingStrategyName] -> Encoding
[SamplingStrategyName] -> Value
SamplingStrategyName -> Encoding
SamplingStrategyName -> Value
(SamplingStrategyName -> Value)
-> (SamplingStrategyName -> Encoding)
-> ([SamplingStrategyName] -> Value)
-> ([SamplingStrategyName] -> Encoding)
-> ToJSON SamplingStrategyName
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [SamplingStrategyName] -> Encoding
$ctoEncodingList :: [SamplingStrategyName] -> Encoding
toJSONList :: [SamplingStrategyName] -> Value
$ctoJSONList :: [SamplingStrategyName] -> Value
toEncoding :: SamplingStrategyName -> Encoding
$ctoEncoding :: SamplingStrategyName -> Encoding
toJSON :: SamplingStrategyName -> Value
$ctoJSON :: SamplingStrategyName -> Value
Core.ToJSON,
      ToJSONKeyFunction [SamplingStrategyName]
ToJSONKeyFunction SamplingStrategyName
ToJSONKeyFunction SamplingStrategyName
-> ToJSONKeyFunction [SamplingStrategyName]
-> ToJSONKey SamplingStrategyName
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [SamplingStrategyName]
$ctoJSONKeyList :: ToJSONKeyFunction [SamplingStrategyName]
toJSONKey :: ToJSONKeyFunction SamplingStrategyName
$ctoJSONKey :: ToJSONKeyFunction SamplingStrategyName
Core.ToJSONKey,
      [Node] -> Either String SamplingStrategyName
([Node] -> Either String SamplingStrategyName)
-> FromXML SamplingStrategyName
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String SamplingStrategyName
$cparseXML :: [Node] -> Either String SamplingStrategyName
Core.FromXML,
      SamplingStrategyName -> XML
(SamplingStrategyName -> XML) -> ToXML SamplingStrategyName
forall a. (a -> XML) -> ToXML a
toXML :: SamplingStrategyName -> XML
$ctoXML :: SamplingStrategyName -> XML
Core.ToXML
    )

pattern SamplingStrategyName_FixedRate :: SamplingStrategyName
pattern $bSamplingStrategyName_FixedRate :: SamplingStrategyName
$mSamplingStrategyName_FixedRate :: forall r. SamplingStrategyName -> (Void# -> r) -> (Void# -> r) -> r
SamplingStrategyName_FixedRate = SamplingStrategyName' "FixedRate"

pattern SamplingStrategyName_PartialScan :: SamplingStrategyName
pattern $bSamplingStrategyName_PartialScan :: SamplingStrategyName
$mSamplingStrategyName_PartialScan :: forall r. SamplingStrategyName -> (Void# -> r) -> (Void# -> r) -> r
SamplingStrategyName_PartialScan = SamplingStrategyName' "PartialScan"

{-# COMPLETE
  SamplingStrategyName_FixedRate,
  SamplingStrategyName_PartialScan,
  SamplingStrategyName'
  #-}