{-# 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.RebootOption
-- 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.RebootOption
  ( RebootOption
      ( ..,
        RebootOption_NoReboot,
        RebootOption_RebootIfNeeded
      ),
  )
where

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

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

pattern RebootOption_NoReboot :: RebootOption
pattern $bRebootOption_NoReboot :: RebootOption
$mRebootOption_NoReboot :: forall r. RebootOption -> (Void# -> r) -> (Void# -> r) -> r
RebootOption_NoReboot = RebootOption' "NoReboot"

pattern RebootOption_RebootIfNeeded :: RebootOption
pattern $bRebootOption_RebootIfNeeded :: RebootOption
$mRebootOption_RebootIfNeeded :: forall r. RebootOption -> (Void# -> r) -> (Void# -> r) -> r
RebootOption_RebootIfNeeded = RebootOption' "RebootIfNeeded"

{-# COMPLETE
  RebootOption_NoReboot,
  RebootOption_RebootIfNeeded,
  RebootOption'
  #-}