{-# 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.ECS.Types.Scope
-- 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.ECS.Types.Scope
  ( Scope
      ( ..,
        Scope_Shared,
        Scope_Task
      ),
  )
where

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

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

pattern Scope_Shared :: Scope
pattern $bScope_Shared :: Scope
$mScope_Shared :: forall r. Scope -> (Void# -> r) -> (Void# -> r) -> r
Scope_Shared = Scope' "shared"

pattern Scope_Task :: Scope
pattern $bScope_Task :: Scope
$mScope_Task :: forall r. Scope -> (Void# -> r) -> (Void# -> r) -> r
Scope_Task = Scope' "task"

{-# COMPLETE
  Scope_Shared,
  Scope_Task,
  Scope'
  #-}