{-# 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.RAM.Types.ResourceShareAssociationType
-- 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.RAM.Types.ResourceShareAssociationType
  ( ResourceShareAssociationType
      ( ..,
        ResourceShareAssociationType_PRINCIPAL,
        ResourceShareAssociationType_RESOURCE
      ),
  )
where

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

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

pattern ResourceShareAssociationType_PRINCIPAL :: ResourceShareAssociationType
pattern $bResourceShareAssociationType_PRINCIPAL :: ResourceShareAssociationType
$mResourceShareAssociationType_PRINCIPAL :: forall r.
ResourceShareAssociationType -> (Void# -> r) -> (Void# -> r) -> r
ResourceShareAssociationType_PRINCIPAL = ResourceShareAssociationType' "PRINCIPAL"

pattern ResourceShareAssociationType_RESOURCE :: ResourceShareAssociationType
pattern $bResourceShareAssociationType_RESOURCE :: ResourceShareAssociationType
$mResourceShareAssociationType_RESOURCE :: forall r.
ResourceShareAssociationType -> (Void# -> r) -> (Void# -> r) -> r
ResourceShareAssociationType_RESOURCE = ResourceShareAssociationType' "RESOURCE"

{-# COMPLETE
  ResourceShareAssociationType_PRINCIPAL,
  ResourceShareAssociationType_RESOURCE,
  ResourceShareAssociationType'
  #-}