{-# 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.ResourceGroupsTagging.Types.GroupByAttribute
-- 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.ResourceGroupsTagging.Types.GroupByAttribute
  ( GroupByAttribute
      ( ..,
        GroupByAttribute_REGION,
        GroupByAttribute_RESOURCE_TYPE,
        GroupByAttribute_TARGET_ID
      ),
  )
where

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

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

pattern GroupByAttribute_REGION :: GroupByAttribute
pattern $bGroupByAttribute_REGION :: GroupByAttribute
$mGroupByAttribute_REGION :: forall r. GroupByAttribute -> (Void# -> r) -> (Void# -> r) -> r
GroupByAttribute_REGION = GroupByAttribute' "REGION"

pattern GroupByAttribute_RESOURCE_TYPE :: GroupByAttribute
pattern $bGroupByAttribute_RESOURCE_TYPE :: GroupByAttribute
$mGroupByAttribute_RESOURCE_TYPE :: forall r. GroupByAttribute -> (Void# -> r) -> (Void# -> r) -> r
GroupByAttribute_RESOURCE_TYPE = GroupByAttribute' "RESOURCE_TYPE"

pattern GroupByAttribute_TARGET_ID :: GroupByAttribute
pattern $bGroupByAttribute_TARGET_ID :: GroupByAttribute
$mGroupByAttribute_TARGET_ID :: forall r. GroupByAttribute -> (Void# -> r) -> (Void# -> r) -> r
GroupByAttribute_TARGET_ID = GroupByAttribute' "TARGET_ID"

{-# COMPLETE
  GroupByAttribute_REGION,
  GroupByAttribute_RESOURCE_TYPE,
  GroupByAttribute_TARGET_ID,
  GroupByAttribute'
  #-}