{-# 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.CodeGuruReviewer.Types.RepositoryAssociationState
-- 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.CodeGuruReviewer.Types.RepositoryAssociationState
  ( RepositoryAssociationState
      ( ..,
        RepositoryAssociationState_Associated,
        RepositoryAssociationState_Associating,
        RepositoryAssociationState_Disassociated,
        RepositoryAssociationState_Disassociating,
        RepositoryAssociationState_Failed
      ),
  )
where

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

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

pattern RepositoryAssociationState_Associated :: RepositoryAssociationState
pattern $bRepositoryAssociationState_Associated :: RepositoryAssociationState
$mRepositoryAssociationState_Associated :: forall r.
RepositoryAssociationState -> (Void# -> r) -> (Void# -> r) -> r
RepositoryAssociationState_Associated = RepositoryAssociationState' "Associated"

pattern RepositoryAssociationState_Associating :: RepositoryAssociationState
pattern $bRepositoryAssociationState_Associating :: RepositoryAssociationState
$mRepositoryAssociationState_Associating :: forall r.
RepositoryAssociationState -> (Void# -> r) -> (Void# -> r) -> r
RepositoryAssociationState_Associating = RepositoryAssociationState' "Associating"

pattern RepositoryAssociationState_Disassociated :: RepositoryAssociationState
pattern $bRepositoryAssociationState_Disassociated :: RepositoryAssociationState
$mRepositoryAssociationState_Disassociated :: forall r.
RepositoryAssociationState -> (Void# -> r) -> (Void# -> r) -> r
RepositoryAssociationState_Disassociated = RepositoryAssociationState' "Disassociated"

pattern RepositoryAssociationState_Disassociating :: RepositoryAssociationState
pattern $bRepositoryAssociationState_Disassociating :: RepositoryAssociationState
$mRepositoryAssociationState_Disassociating :: forall r.
RepositoryAssociationState -> (Void# -> r) -> (Void# -> r) -> r
RepositoryAssociationState_Disassociating = RepositoryAssociationState' "Disassociating"

pattern RepositoryAssociationState_Failed :: RepositoryAssociationState
pattern $bRepositoryAssociationState_Failed :: RepositoryAssociationState
$mRepositoryAssociationState_Failed :: forall r.
RepositoryAssociationState -> (Void# -> r) -> (Void# -> r) -> r
RepositoryAssociationState_Failed = RepositoryAssociationState' "Failed"

{-# COMPLETE
  RepositoryAssociationState_Associated,
  RepositoryAssociationState_Associating,
  RepositoryAssociationState_Disassociated,
  RepositoryAssociationState_Disassociating,
  RepositoryAssociationState_Failed,
  RepositoryAssociationState'
  #-}