{-# 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.ECRPublic.Types.LayerAvailability
-- 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.ECRPublic.Types.LayerAvailability
  ( LayerAvailability
      ( ..,
        LayerAvailability_AVAILABLE,
        LayerAvailability_UNAVAILABLE
      ),
  )
where

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

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

pattern LayerAvailability_AVAILABLE :: LayerAvailability
pattern $bLayerAvailability_AVAILABLE :: LayerAvailability
$mLayerAvailability_AVAILABLE :: forall r. LayerAvailability -> (Void# -> r) -> (Void# -> r) -> r
LayerAvailability_AVAILABLE = LayerAvailability' "AVAILABLE"

pattern LayerAvailability_UNAVAILABLE :: LayerAvailability
pattern $bLayerAvailability_UNAVAILABLE :: LayerAvailability
$mLayerAvailability_UNAVAILABLE :: forall r. LayerAvailability -> (Void# -> r) -> (Void# -> r) -> r
LayerAvailability_UNAVAILABLE = LayerAvailability' "UNAVAILABLE"

{-# COMPLETE
  LayerAvailability_AVAILABLE,
  LayerAvailability_UNAVAILABLE,
  LayerAvailability'
  #-}