{-# 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.WorkSpaces.Types.Tenancy
-- 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.WorkSpaces.Types.Tenancy
  ( Tenancy
      ( ..,
        Tenancy_DEDICATED,
        Tenancy_SHARED
      ),
  )
where

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

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

pattern Tenancy_DEDICATED :: Tenancy
pattern $bTenancy_DEDICATED :: Tenancy
$mTenancy_DEDICATED :: forall r. Tenancy -> (Void# -> r) -> (Void# -> r) -> r
Tenancy_DEDICATED = Tenancy' "DEDICATED"

pattern Tenancy_SHARED :: Tenancy
pattern $bTenancy_SHARED :: Tenancy
$mTenancy_SHARED :: forall r. Tenancy -> (Void# -> r) -> (Void# -> r) -> r
Tenancy_SHARED = Tenancy' "SHARED"

{-# COMPLETE
  Tenancy_DEDICATED,
  Tenancy_SHARED,
  Tenancy'
  #-}