{-# 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.ElasticSearch.Types.TimeUnit
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.ElasticSearch.Types.TimeUnit
  ( TimeUnit
      ( ..,
        TimeUnit_HOURS
      ),
  )
where

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

-- | Specifies the unit of a maintenance schedule duration. Valid value is
-- HOUR. See the
-- <https://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/auto-tune.html Developer Guide>
-- for more information.
newtype TimeUnit = TimeUnit'
  { TimeUnit -> Text
fromTimeUnit ::
      Data.Text
  }
  deriving stock
    ( Int -> TimeUnit -> ShowS
[TimeUnit] -> ShowS
TimeUnit -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [TimeUnit] -> ShowS
$cshowList :: [TimeUnit] -> ShowS
show :: TimeUnit -> String
$cshow :: TimeUnit -> String
showsPrec :: Int -> TimeUnit -> ShowS
$cshowsPrec :: Int -> TimeUnit -> ShowS
Prelude.Show,
      ReadPrec [TimeUnit]
ReadPrec TimeUnit
Int -> ReadS TimeUnit
ReadS [TimeUnit]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [TimeUnit]
$creadListPrec :: ReadPrec [TimeUnit]
readPrec :: ReadPrec TimeUnit
$creadPrec :: ReadPrec TimeUnit
readList :: ReadS [TimeUnit]
$creadList :: ReadS [TimeUnit]
readsPrec :: Int -> ReadS TimeUnit
$creadsPrec :: Int -> ReadS TimeUnit
Prelude.Read,
      TimeUnit -> TimeUnit -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TimeUnit -> TimeUnit -> Bool
$c/= :: TimeUnit -> TimeUnit -> Bool
== :: TimeUnit -> TimeUnit -> Bool
$c== :: TimeUnit -> TimeUnit -> Bool
Prelude.Eq,
      Eq TimeUnit
TimeUnit -> TimeUnit -> Bool
TimeUnit -> TimeUnit -> Ordering
TimeUnit -> TimeUnit -> TimeUnit
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 :: TimeUnit -> TimeUnit -> TimeUnit
$cmin :: TimeUnit -> TimeUnit -> TimeUnit
max :: TimeUnit -> TimeUnit -> TimeUnit
$cmax :: TimeUnit -> TimeUnit -> TimeUnit
>= :: TimeUnit -> TimeUnit -> Bool
$c>= :: TimeUnit -> TimeUnit -> Bool
> :: TimeUnit -> TimeUnit -> Bool
$c> :: TimeUnit -> TimeUnit -> Bool
<= :: TimeUnit -> TimeUnit -> Bool
$c<= :: TimeUnit -> TimeUnit -> Bool
< :: TimeUnit -> TimeUnit -> Bool
$c< :: TimeUnit -> TimeUnit -> Bool
compare :: TimeUnit -> TimeUnit -> Ordering
$ccompare :: TimeUnit -> TimeUnit -> Ordering
Prelude.Ord,
      forall x. Rep TimeUnit x -> TimeUnit
forall x. TimeUnit -> Rep TimeUnit x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep TimeUnit x -> TimeUnit
$cfrom :: forall x. TimeUnit -> Rep TimeUnit x
Prelude.Generic
    )
  deriving newtype
    ( Eq TimeUnit
Int -> TimeUnit -> Int
TimeUnit -> Int
forall a. Eq a -> (Int -> a -> Int) -> (a -> Int) -> Hashable a
hash :: TimeUnit -> Int
$chash :: TimeUnit -> Int
hashWithSalt :: Int -> TimeUnit -> Int
$chashWithSalt :: Int -> TimeUnit -> Int
Prelude.Hashable,
      TimeUnit -> ()
forall a. (a -> ()) -> NFData a
rnf :: TimeUnit -> ()
$crnf :: TimeUnit -> ()
Prelude.NFData,
      Text -> Either String TimeUnit
forall a. (Text -> Either String a) -> FromText a
fromText :: Text -> Either String TimeUnit
$cfromText :: Text -> Either String TimeUnit
Data.FromText,
      TimeUnit -> Text
forall a. (a -> Text) -> ToText a
toText :: TimeUnit -> Text
$ctoText :: TimeUnit -> Text
Data.ToText,
      TimeUnit -> ByteString
forall a. (a -> ByteString) -> ToByteString a
toBS :: TimeUnit -> ByteString
$ctoBS :: TimeUnit -> ByteString
Data.ToByteString,
      TimeUnit -> ByteStringBuilder
forall a. (a -> ByteStringBuilder) -> ToLog a
build :: TimeUnit -> ByteStringBuilder
$cbuild :: TimeUnit -> ByteStringBuilder
Data.ToLog,
      HeaderName -> TimeUnit -> [Header]
forall a. (HeaderName -> a -> [Header]) -> ToHeader a
toHeader :: HeaderName -> TimeUnit -> [Header]
$ctoHeader :: HeaderName -> TimeUnit -> [Header]
Data.ToHeader,
      TimeUnit -> QueryString
forall a. (a -> QueryString) -> ToQuery a
toQuery :: TimeUnit -> QueryString
$ctoQuery :: TimeUnit -> QueryString
Data.ToQuery,
      Value -> Parser [TimeUnit]
Value -> Parser TimeUnit
forall a.
(Value -> Parser a) -> (Value -> Parser [a]) -> FromJSON a
parseJSONList :: Value -> Parser [TimeUnit]
$cparseJSONList :: Value -> Parser [TimeUnit]
parseJSON :: Value -> Parser TimeUnit
$cparseJSON :: Value -> Parser TimeUnit
Data.FromJSON,
      FromJSONKeyFunction [TimeUnit]
FromJSONKeyFunction TimeUnit
forall a.
FromJSONKeyFunction a -> FromJSONKeyFunction [a] -> FromJSONKey a
fromJSONKeyList :: FromJSONKeyFunction [TimeUnit]
$cfromJSONKeyList :: FromJSONKeyFunction [TimeUnit]
fromJSONKey :: FromJSONKeyFunction TimeUnit
$cfromJSONKey :: FromJSONKeyFunction TimeUnit
Data.FromJSONKey,
      [TimeUnit] -> Encoding
[TimeUnit] -> Value
TimeUnit -> Encoding
TimeUnit -> Value
forall a.
(a -> Value)
-> (a -> Encoding)
-> ([a] -> Value)
-> ([a] -> Encoding)
-> ToJSON a
toEncodingList :: [TimeUnit] -> Encoding
$ctoEncodingList :: [TimeUnit] -> Encoding
toJSONList :: [TimeUnit] -> Value
$ctoJSONList :: [TimeUnit] -> Value
toEncoding :: TimeUnit -> Encoding
$ctoEncoding :: TimeUnit -> Encoding
toJSON :: TimeUnit -> Value
$ctoJSON :: TimeUnit -> Value
Data.ToJSON,
      ToJSONKeyFunction [TimeUnit]
ToJSONKeyFunction TimeUnit
forall a.
ToJSONKeyFunction a -> ToJSONKeyFunction [a] -> ToJSONKey a
toJSONKeyList :: ToJSONKeyFunction [TimeUnit]
$ctoJSONKeyList :: ToJSONKeyFunction [TimeUnit]
toJSONKey :: ToJSONKeyFunction TimeUnit
$ctoJSONKey :: ToJSONKeyFunction TimeUnit
Data.ToJSONKey,
      [Node] -> Either String TimeUnit
forall a. ([Node] -> Either String a) -> FromXML a
parseXML :: [Node] -> Either String TimeUnit
$cparseXML :: [Node] -> Either String TimeUnit
Data.FromXML,
      TimeUnit -> XML
forall a. (a -> XML) -> ToXML a
toXML :: TimeUnit -> XML
$ctoXML :: TimeUnit -> XML
Data.ToXML
    )

pattern TimeUnit_HOURS :: TimeUnit
pattern $bTimeUnit_HOURS :: TimeUnit
$mTimeUnit_HOURS :: forall {r}. TimeUnit -> ((# #) -> r) -> ((# #) -> r) -> r
TimeUnit_HOURS = TimeUnit' "HOURS"

{-# COMPLETE
  TimeUnit_HOURS,
  TimeUnit'
  #-}