{-# 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.WorkDocs.Types.CommentVisibilityType
-- 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.WorkDocs.Types.CommentVisibilityType
  ( CommentVisibilityType
      ( ..,
        CommentVisibilityType_PRIVATE,
        CommentVisibilityType_PUBLIC
      ),
  )
where

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

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

pattern CommentVisibilityType_PRIVATE :: CommentVisibilityType
pattern $bCommentVisibilityType_PRIVATE :: CommentVisibilityType
$mCommentVisibilityType_PRIVATE :: forall r.
CommentVisibilityType -> (Void# -> r) -> (Void# -> r) -> r
CommentVisibilityType_PRIVATE = CommentVisibilityType' "PRIVATE"

pattern CommentVisibilityType_PUBLIC :: CommentVisibilityType
pattern $bCommentVisibilityType_PUBLIC :: CommentVisibilityType
$mCommentVisibilityType_PUBLIC :: forall r.
CommentVisibilityType -> (Void# -> r) -> (Void# -> r) -> r
CommentVisibilityType_PUBLIC = CommentVisibilityType' "PUBLIC"

{-# COMPLETE
  CommentVisibilityType_PRIVATE,
  CommentVisibilityType_PUBLIC,
  CommentVisibilityType'
  #-}