{-# 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.CloudWatchLogs.Types.Distribution
-- 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.CloudWatchLogs.Types.Distribution
  ( Distribution
      ( ..,
        Distribution_ByLogStream,
        Distribution_Random
      ),
  )
where

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

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

pattern Distribution_ByLogStream :: Distribution
pattern $bDistribution_ByLogStream :: Distribution
$mDistribution_ByLogStream :: forall r. Distribution -> (Void# -> r) -> (Void# -> r) -> r
Distribution_ByLogStream = Distribution' "ByLogStream"

pattern Distribution_Random :: Distribution
pattern $bDistribution_Random :: Distribution
$mDistribution_Random :: forall r. Distribution -> (Void# -> r) -> (Void# -> r) -> r
Distribution_Random = Distribution' "Random"

{-# COMPLETE
  Distribution_ByLogStream,
  Distribution_Random,
  Distribution'
  #-}