{-# 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.KinesisAnalyticsV2.Types.ApplicationMode
-- 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.KinesisAnalyticsV2.Types.ApplicationMode
  ( ApplicationMode
      ( ..,
        ApplicationMode_INTERACTIVE,
        ApplicationMode_STREAMING
      ),
  )
where

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

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

pattern ApplicationMode_INTERACTIVE :: ApplicationMode
pattern $bApplicationMode_INTERACTIVE :: ApplicationMode
$mApplicationMode_INTERACTIVE :: forall r. ApplicationMode -> (Void# -> r) -> (Void# -> r) -> r
ApplicationMode_INTERACTIVE = ApplicationMode' "INTERACTIVE"

pattern ApplicationMode_STREAMING :: ApplicationMode
pattern $bApplicationMode_STREAMING :: ApplicationMode
$mApplicationMode_STREAMING :: forall r. ApplicationMode -> (Void# -> r) -> (Void# -> r) -> r
ApplicationMode_STREAMING = ApplicationMode' "STREAMING"

{-# COMPLETE
  ApplicationMode_INTERACTIVE,
  ApplicationMode_STREAMING,
  ApplicationMode'
  #-}