{-# 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.MediaTailor.Types.AccessType
-- 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.MediaTailor.Types.AccessType
  ( AccessType
      ( ..,
        AccessType_S3_SIGV4,
        AccessType_SECRETS_MANAGER_ACCESS_TOKEN
      ),
  )
where

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

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

pattern AccessType_S3_SIGV4 :: AccessType
pattern $bAccessType_S3_SIGV4 :: AccessType
$mAccessType_S3_SIGV4 :: forall r. AccessType -> (Void# -> r) -> (Void# -> r) -> r
AccessType_S3_SIGV4 = AccessType' "S3_SIGV4"

pattern AccessType_SECRETS_MANAGER_ACCESS_TOKEN :: AccessType
pattern $bAccessType_SECRETS_MANAGER_ACCESS_TOKEN :: AccessType
$mAccessType_SECRETS_MANAGER_ACCESS_TOKEN :: forall r. AccessType -> (Void# -> r) -> (Void# -> r) -> r
AccessType_SECRETS_MANAGER_ACCESS_TOKEN = AccessType' "SECRETS_MANAGER_ACCESS_TOKEN"

{-# COMPLETE
  AccessType_S3_SIGV4,
  AccessType_SECRETS_MANAGER_ACCESS_TOKEN,
  AccessType'
  #-}