{-# 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.Nimble.Types.StudioComponentState
-- 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.Nimble.Types.StudioComponentState
  ( StudioComponentState
      ( ..,
        StudioComponentState_CREATE_FAILED,
        StudioComponentState_CREATE_IN_PROGRESS,
        StudioComponentState_DELETED,
        StudioComponentState_DELETE_FAILED,
        StudioComponentState_DELETE_IN_PROGRESS,
        StudioComponentState_READY,
        StudioComponentState_UPDATE_FAILED,
        StudioComponentState_UPDATE_IN_PROGRESS
      ),
  )
where

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

-- | The current state of the studio component resource.
--
-- While a studio component is being created, modified, or deleted, its
-- state will equal \"CREATE_IN_PROGRESS\", \"UPDATE_IN_PROGRESS\", or
-- \"DELETE_IN_PROGRESS\"
--
-- These are called \'transition states\'.
--
-- No modifications may be made to the studio component while it is in a
-- transition state.
--
-- If creation of the resource fails, the state will change to
-- \`CREATE_FAILED\`. The resource StatusCode and StatusMessage will
-- provide more information of why creation failed. The resource in this
-- state will automatically be deleted from your account after a period of
-- time.
--
-- If updating the resource fails, the state will change to
-- \`UPDATE_FAILED\`. The resource StatusCode and StatusMessage will
-- provide more information of why the update failed. The resource will be
-- returned to the state it was in when the update request was invoked.
--
-- If deleting the resource fails, the state will change to
-- \`DELETE_FAILED\`. The resource StatusCode and StatusMessage will
-- provide more information of why the update failed. The resource will be
-- returned to the state it was in when the update request was invoked.
-- After the resource is deleted successfully, it will change to the
-- \"DELETED\" state. The resource will no longer count against service
-- quotas and cannot be used or acted upon any futher. It will be removed
-- from your account after a period of time.
newtype StudioComponentState = StudioComponentState'
  { StudioComponentState -> Text
fromStudioComponentState ::
      Core.Text
  }
  deriving stock
    ( Int -> StudioComponentState -> ShowS
[StudioComponentState] -> ShowS
StudioComponentState -> String
(Int -> StudioComponentState -> ShowS)
-> (StudioComponentState -> String)
-> ([StudioComponentState] -> ShowS)
-> Show StudioComponentState
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [StudioComponentState] -> ShowS
$cshowList :: [StudioComponentState] -> ShowS
show :: StudioComponentState -> String
$cshow :: StudioComponentState -> String
showsPrec :: Int -> StudioComponentState -> ShowS
$cshowsPrec :: Int -> StudioComponentState -> ShowS
Prelude.Show,
      ReadPrec [StudioComponentState]
ReadPrec StudioComponentState
Int -> ReadS StudioComponentState
ReadS [StudioComponentState]
(Int -> ReadS StudioComponentState)
-> ReadS [StudioComponentState]
-> ReadPrec StudioComponentState
-> ReadPrec [StudioComponentState]
-> Read StudioComponentState
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [StudioComponentState]
$creadListPrec :: ReadPrec [StudioComponentState]
readPrec :: ReadPrec StudioComponentState
$creadPrec :: ReadPrec StudioComponentState
readList :: ReadS [StudioComponentState]
$creadList :: ReadS [StudioComponentState]
readsPrec :: Int -> ReadS StudioComponentState
$creadsPrec :: Int -> ReadS StudioComponentState
Prelude.Read,
      StudioComponentState -> StudioComponentState -> Bool
(StudioComponentState -> StudioComponentState -> Bool)
-> (StudioComponentState -> StudioComponentState -> Bool)
-> Eq StudioComponentState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: StudioComponentState -> StudioComponentState -> Bool
$c/= :: StudioComponentState -> StudioComponentState -> Bool
== :: StudioComponentState -> StudioComponentState -> Bool
$c== :: StudioComponentState -> StudioComponentState -> Bool
Prelude.Eq,
      Eq StudioComponentState
Eq StudioComponentState
-> (StudioComponentState -> StudioComponentState -> Ordering)
-> (StudioComponentState -> StudioComponentState -> Bool)
-> (StudioComponentState -> StudioComponentState -> Bool)
-> (StudioComponentState -> StudioComponentState -> Bool)
-> (StudioComponentState -> StudioComponentState -> Bool)
-> (StudioComponentState
    -> StudioComponentState -> StudioComponentState)
-> (StudioComponentState
    -> StudioComponentState -> StudioComponentState)
-> Ord StudioComponentState
StudioComponentState -> StudioComponentState -> Bool
StudioComponentState -> StudioComponentState -> Ordering
StudioComponentState
-> StudioComponentState -> StudioComponentState
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 :: StudioComponentState
-> StudioComponentState -> StudioComponentState
$cmin :: StudioComponentState
-> StudioComponentState -> StudioComponentState
max :: StudioComponentState
-> StudioComponentState -> StudioComponentState
$cmax :: StudioComponentState
-> StudioComponentState -> StudioComponentState
>= :: StudioComponentState -> StudioComponentState -> Bool
$c>= :: StudioComponentState -> StudioComponentState -> Bool
> :: StudioComponentState -> StudioComponentState -> Bool
$c> :: StudioComponentState -> StudioComponentState -> Bool
<= :: StudioComponentState -> StudioComponentState -> Bool
$c<= :: StudioComponentState -> StudioComponentState -> Bool
< :: StudioComponentState -> StudioComponentState -> Bool
$c< :: StudioComponentState -> StudioComponentState -> Bool
compare :: StudioComponentState -> StudioComponentState -> Ordering
$ccompare :: StudioComponentState -> StudioComponentState -> Ordering
$cp1Ord :: Eq StudioComponentState
Prelude.Ord,
      (forall x. StudioComponentState -> Rep StudioComponentState x)
-> (forall x. Rep StudioComponentState x -> StudioComponentState)
-> Generic StudioComponentState
forall x. Rep StudioComponentState x -> StudioComponentState
forall x. StudioComponentState -> Rep StudioComponentState x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep StudioComponentState x -> StudioComponentState
$cfrom :: forall x. StudioComponentState -> Rep StudioComponentState x
Prelude.Generic
    )
  deriving newtype
    ( Int -> StudioComponentState -> Int
StudioComponentState -> Int
(Int -> StudioComponentState -> Int)
-> (StudioComponentState -> Int) -> Hashable StudioComponentState
forall a. (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: StudioComponentState -> Int
$chash :: StudioComponentState -> Int
hashWithSalt :: Int -> StudioComponentState -> Int
$chashWithSalt :: Int -> StudioComponentState -> Int
Prelude.Hashable,
      StudioComponentState -> ()
(StudioComponentState -> ()) -> NFData StudioComponentState
forall a. (a -> ()) -> NFData a
rnf :: StudioComponentState -> ()
$crnf :: StudioComponentState -> ()
Prelude.NFData,
      Text -> Either String StudioComponentState
(Text -> Either String StudioComponentState)
-> FromText StudioComponentState
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String StudioComponentState
$cfromText :: Text -> Either String StudioComponentState
Core.FromText,
      StudioComponentState -> Text
(StudioComponentState -> Text) -> ToText StudioComponentState
forall a. (a -> Text) -> ToText a
toText :: StudioComponentState -> Text
$ctoText :: StudioComponentState -> Text
Core.ToText,
      StudioComponentState -> ByteString
(StudioComponentState -> ByteString)
-> ToByteString StudioComponentState
forall a. (a -> ByteString) -> ToByteString a
toBS :: StudioComponentState -> ByteString
$ctoBS :: StudioComponentState -> ByteString
Core.ToByteString,
      StudioComponentState -> ByteStringBuilder
(StudioComponentState -> ByteStringBuilder)
-> ToLog StudioComponentState
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: StudioComponentState -> ByteStringBuilder
$cbuild :: StudioComponentState -> ByteStringBuilder
Core.ToLog,
      HeaderName -> StudioComponentState -> [Header]
(HeaderName -> StudioComponentState -> [Header])
-> ToHeader StudioComponentState
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> StudioComponentState -> [Header]
$ctoHeader :: HeaderName -> StudioComponentState -> [Header]
Core.ToHeader,
      StudioComponentState -> QueryString
(StudioComponentState -> QueryString)
-> ToQuery StudioComponentState
forall a. (a -> QueryString) -> ToQuery a
toQuery :: StudioComponentState -> QueryString
$ctoQuery :: StudioComponentState -> QueryString
Core.ToQuery,
      Value -> Parser [StudioComponentState]
Value -> Parser StudioComponentState
(Value -> Parser StudioComponentState)
-> (Value -> Parser [StudioComponentState])
-> FromJSON StudioComponentState
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [StudioComponentState]
$cparseJSONList :: Value -> Parser [StudioComponentState]
parseJSON :: Value -> Parser StudioComponentState
$cparseJSON :: Value -> Parser StudioComponentState
Core.FromJSON,
      FromJSONKeyFunction [StudioComponentState]
FromJSONKeyFunction StudioComponentState
FromJSONKeyFunction StudioComponentState
-> FromJSONKeyFunction [StudioComponentState]
-> FromJSONKey StudioComponentState
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [StudioComponentState]
$cfromJSONKeyList :: FromJSONKeyFunction [StudioComponentState]
fromJSONKey :: FromJSONKeyFunction StudioComponentState
$cfromJSONKey :: FromJSONKeyFunction StudioComponentState
Core.FromJSONKey,
      [StudioComponentState] -> Encoding
[StudioComponentState] -> Value
StudioComponentState -> Encoding
StudioComponentState -> Value
(StudioComponentState -> Value)
-> (StudioComponentState -> Encoding)
-> ([StudioComponentState] -> Value)
-> ([StudioComponentState] -> Encoding)
-> ToJSON StudioComponentState
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [StudioComponentState] -> Encoding
$ctoEncodingList :: [StudioComponentState] -> Encoding
toJSONList :: [StudioComponentState] -> Value
$ctoJSONList :: [StudioComponentState] -> Value
toEncoding :: StudioComponentState -> Encoding
$ctoEncoding :: StudioComponentState -> Encoding
toJSON :: StudioComponentState -> Value
$ctoJSON :: StudioComponentState -> Value
Core.ToJSON,
      ToJSONKeyFunction [StudioComponentState]
ToJSONKeyFunction StudioComponentState
ToJSONKeyFunction StudioComponentState
-> ToJSONKeyFunction [StudioComponentState]
-> ToJSONKey StudioComponentState
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [StudioComponentState]
$ctoJSONKeyList :: ToJSONKeyFunction [StudioComponentState]
toJSONKey :: ToJSONKeyFunction StudioComponentState
$ctoJSONKey :: ToJSONKeyFunction StudioComponentState
Core.ToJSONKey,
      [Node] -> Either String StudioComponentState
([Node] -> Either String StudioComponentState)
-> FromXML StudioComponentState
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String StudioComponentState
$cparseXML :: [Node] -> Either String StudioComponentState
Core.FromXML,
      StudioComponentState -> XML
(StudioComponentState -> XML) -> ToXML StudioComponentState
forall a. (a -> XML) -> ToXML a
toXML :: StudioComponentState -> XML
$ctoXML :: StudioComponentState -> XML
Core.ToXML
    )

pattern StudioComponentState_CREATE_FAILED :: StudioComponentState
pattern $bStudioComponentState_CREATE_FAILED :: StudioComponentState
$mStudioComponentState_CREATE_FAILED :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_CREATE_FAILED = StudioComponentState' "CREATE_FAILED"

pattern StudioComponentState_CREATE_IN_PROGRESS :: StudioComponentState
pattern $bStudioComponentState_CREATE_IN_PROGRESS :: StudioComponentState
$mStudioComponentState_CREATE_IN_PROGRESS :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_CREATE_IN_PROGRESS = StudioComponentState' "CREATE_IN_PROGRESS"

pattern StudioComponentState_DELETED :: StudioComponentState
pattern $bStudioComponentState_DELETED :: StudioComponentState
$mStudioComponentState_DELETED :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_DELETED = StudioComponentState' "DELETED"

pattern StudioComponentState_DELETE_FAILED :: StudioComponentState
pattern $bStudioComponentState_DELETE_FAILED :: StudioComponentState
$mStudioComponentState_DELETE_FAILED :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_DELETE_FAILED = StudioComponentState' "DELETE_FAILED"

pattern StudioComponentState_DELETE_IN_PROGRESS :: StudioComponentState
pattern $bStudioComponentState_DELETE_IN_PROGRESS :: StudioComponentState
$mStudioComponentState_DELETE_IN_PROGRESS :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_DELETE_IN_PROGRESS = StudioComponentState' "DELETE_IN_PROGRESS"

pattern StudioComponentState_READY :: StudioComponentState
pattern $bStudioComponentState_READY :: StudioComponentState
$mStudioComponentState_READY :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_READY = StudioComponentState' "READY"

pattern StudioComponentState_UPDATE_FAILED :: StudioComponentState
pattern $bStudioComponentState_UPDATE_FAILED :: StudioComponentState
$mStudioComponentState_UPDATE_FAILED :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_UPDATE_FAILED = StudioComponentState' "UPDATE_FAILED"

pattern StudioComponentState_UPDATE_IN_PROGRESS :: StudioComponentState
pattern $bStudioComponentState_UPDATE_IN_PROGRESS :: StudioComponentState
$mStudioComponentState_UPDATE_IN_PROGRESS :: forall r. StudioComponentState -> (Void# -> r) -> (Void# -> r) -> r
StudioComponentState_UPDATE_IN_PROGRESS = StudioComponentState' "UPDATE_IN_PROGRESS"

{-# COMPLETE
  StudioComponentState_CREATE_FAILED,
  StudioComponentState_CREATE_IN_PROGRESS,
  StudioComponentState_DELETED,
  StudioComponentState_DELETE_FAILED,
  StudioComponentState_DELETE_IN_PROGRESS,
  StudioComponentState_READY,
  StudioComponentState_UPDATE_FAILED,
  StudioComponentState_UPDATE_IN_PROGRESS,
  StudioComponentState'
  #-}