{-# 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.OpenSearchServerless.Types.CollectionStatus
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.OpenSearchServerless.Types.CollectionStatus
  ( CollectionStatus
      ( ..,
        CollectionStatus_ACTIVE,
        CollectionStatus_CREATING,
        CollectionStatus_DELETING,
        CollectionStatus_FAILED
      ),
  )
where

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

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

pattern CollectionStatus_ACTIVE :: CollectionStatus
pattern $bCollectionStatus_ACTIVE :: CollectionStatus
$mCollectionStatus_ACTIVE :: forall {r}. CollectionStatus -> ((# #) -> r) -> ((# #) -> r) -> r
CollectionStatus_ACTIVE = CollectionStatus' "ACTIVE"

pattern CollectionStatus_CREATING :: CollectionStatus
pattern $bCollectionStatus_CREATING :: CollectionStatus
$mCollectionStatus_CREATING :: forall {r}. CollectionStatus -> ((# #) -> r) -> ((# #) -> r) -> r
CollectionStatus_CREATING = CollectionStatus' "CREATING"

pattern CollectionStatus_DELETING :: CollectionStatus
pattern $bCollectionStatus_DELETING :: CollectionStatus
$mCollectionStatus_DELETING :: forall {r}. CollectionStatus -> ((# #) -> r) -> ((# #) -> r) -> r
CollectionStatus_DELETING = CollectionStatus' "DELETING"

pattern CollectionStatus_FAILED :: CollectionStatus
pattern $bCollectionStatus_FAILED :: CollectionStatus
$mCollectionStatus_FAILED :: forall {r}. CollectionStatus -> ((# #) -> r) -> ((# #) -> r) -> r
CollectionStatus_FAILED = CollectionStatus' "FAILED"

{-# COMPLETE
  CollectionStatus_ACTIVE,
  CollectionStatus_CREATING,
  CollectionStatus_DELETING,
  CollectionStatus_FAILED,
  CollectionStatus'
  #-}