{-# 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.IoT.Types.CannedAccessControlList
-- 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.IoT.Types.CannedAccessControlList
  ( CannedAccessControlList
      ( ..,
        CannedAccessControlList_Authenticated_read,
        CannedAccessControlList_Aws_exec_read,
        CannedAccessControlList_Bucket_owner_full_control,
        CannedAccessControlList_Bucket_owner_read,
        CannedAccessControlList_Log_delivery_write,
        CannedAccessControlList_Private,
        CannedAccessControlList_Public_read,
        CannedAccessControlList_Public_read_write
      ),
  )
where

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

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

pattern CannedAccessControlList_Authenticated_read :: CannedAccessControlList
pattern $bCannedAccessControlList_Authenticated_read :: CannedAccessControlList
$mCannedAccessControlList_Authenticated_read :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Authenticated_read = CannedAccessControlList' "authenticated-read"

pattern CannedAccessControlList_Aws_exec_read :: CannedAccessControlList
pattern $bCannedAccessControlList_Aws_exec_read :: CannedAccessControlList
$mCannedAccessControlList_Aws_exec_read :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Aws_exec_read = CannedAccessControlList' "aws-exec-read"

pattern CannedAccessControlList_Bucket_owner_full_control :: CannedAccessControlList
pattern $bCannedAccessControlList_Bucket_owner_full_control :: CannedAccessControlList
$mCannedAccessControlList_Bucket_owner_full_control :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Bucket_owner_full_control = CannedAccessControlList' "bucket-owner-full-control"

pattern CannedAccessControlList_Bucket_owner_read :: CannedAccessControlList
pattern $bCannedAccessControlList_Bucket_owner_read :: CannedAccessControlList
$mCannedAccessControlList_Bucket_owner_read :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Bucket_owner_read = CannedAccessControlList' "bucket-owner-read"

pattern CannedAccessControlList_Log_delivery_write :: CannedAccessControlList
pattern $bCannedAccessControlList_Log_delivery_write :: CannedAccessControlList
$mCannedAccessControlList_Log_delivery_write :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Log_delivery_write = CannedAccessControlList' "log-delivery-write"

pattern CannedAccessControlList_Private :: CannedAccessControlList
pattern $bCannedAccessControlList_Private :: CannedAccessControlList
$mCannedAccessControlList_Private :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Private = CannedAccessControlList' "private"

pattern CannedAccessControlList_Public_read :: CannedAccessControlList
pattern $bCannedAccessControlList_Public_read :: CannedAccessControlList
$mCannedAccessControlList_Public_read :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Public_read = CannedAccessControlList' "public-read"

pattern CannedAccessControlList_Public_read_write :: CannedAccessControlList
pattern $bCannedAccessControlList_Public_read_write :: CannedAccessControlList
$mCannedAccessControlList_Public_read_write :: forall r.
CannedAccessControlList -> (Void# -> r) -> (Void# -> r) -> r
CannedAccessControlList_Public_read_write = CannedAccessControlList' "public-read-write"

{-# COMPLETE
  CannedAccessControlList_Authenticated_read,
  CannedAccessControlList_Aws_exec_read,
  CannedAccessControlList_Bucket_owner_full_control,
  CannedAccessControlList_Bucket_owner_read,
  CannedAccessControlList_Log_delivery_write,
  CannedAccessControlList_Private,
  CannedAccessControlList_Public_read,
  CannedAccessControlList_Public_read_write,
  CannedAccessControlList'
  #-}