{-# 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.WorkSpaces.Types.TargetWorkspaceState
-- 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.WorkSpaces.Types.TargetWorkspaceState
  ( TargetWorkspaceState
      ( ..,
        TargetWorkspaceState_ADMIN_MAINTENANCE,
        TargetWorkspaceState_AVAILABLE
      ),
  )
where

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

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

pattern TargetWorkspaceState_ADMIN_MAINTENANCE :: TargetWorkspaceState
pattern $bTargetWorkspaceState_ADMIN_MAINTENANCE :: TargetWorkspaceState
$mTargetWorkspaceState_ADMIN_MAINTENANCE :: forall r. TargetWorkspaceState -> (Void# -> r) -> (Void# -> r) -> r
TargetWorkspaceState_ADMIN_MAINTENANCE = TargetWorkspaceState' "ADMIN_MAINTENANCE"

pattern TargetWorkspaceState_AVAILABLE :: TargetWorkspaceState
pattern $bTargetWorkspaceState_AVAILABLE :: TargetWorkspaceState
$mTargetWorkspaceState_AVAILABLE :: forall r. TargetWorkspaceState -> (Void# -> r) -> (Void# -> r) -> r
TargetWorkspaceState_AVAILABLE = TargetWorkspaceState' "AVAILABLE"

{-# COMPLETE
  TargetWorkspaceState_ADMIN_MAINTENANCE,
  TargetWorkspaceState_AVAILABLE,
  TargetWorkspaceState'
  #-}