{-# 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.SSM.Types.CalendarState
-- 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.SSM.Types.CalendarState
  ( CalendarState
      ( ..,
        CalendarState_CLOSED,
        CalendarState_OPEN
      ),
  )
where

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

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

pattern CalendarState_CLOSED :: CalendarState
pattern $bCalendarState_CLOSED :: CalendarState
$mCalendarState_CLOSED :: forall r. CalendarState -> (Void# -> r) -> (Void# -> r) -> r
CalendarState_CLOSED = CalendarState' "CLOSED"

pattern CalendarState_OPEN :: CalendarState
pattern $bCalendarState_OPEN :: CalendarState
$mCalendarState_OPEN :: forall r. CalendarState -> (Void# -> r) -> (Void# -> r) -> r
CalendarState_OPEN = CalendarState' "OPEN"

{-# COMPLETE
  CalendarState_CLOSED,
  CalendarState_OPEN,
  CalendarState'
  #-}