{-# 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.CodeDeploy.Types.MinimumHealthyHostsType
-- 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.CodeDeploy.Types.MinimumHealthyHostsType
  ( MinimumHealthyHostsType
      ( ..,
        MinimumHealthyHostsType_FLEET_PERCENT,
        MinimumHealthyHostsType_HOST_COUNT
      ),
  )
where

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

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

pattern MinimumHealthyHostsType_FLEET_PERCENT :: MinimumHealthyHostsType
pattern $bMinimumHealthyHostsType_FLEET_PERCENT :: MinimumHealthyHostsType
$mMinimumHealthyHostsType_FLEET_PERCENT :: forall r.
MinimumHealthyHostsType -> (Void# -> r) -> (Void# -> r) -> r
MinimumHealthyHostsType_FLEET_PERCENT = MinimumHealthyHostsType' "FLEET_PERCENT"

pattern MinimumHealthyHostsType_HOST_COUNT :: MinimumHealthyHostsType
pattern $bMinimumHealthyHostsType_HOST_COUNT :: MinimumHealthyHostsType
$mMinimumHealthyHostsType_HOST_COUNT :: forall r.
MinimumHealthyHostsType -> (Void# -> r) -> (Void# -> r) -> r
MinimumHealthyHostsType_HOST_COUNT = MinimumHealthyHostsType' "HOST_COUNT"

{-# COMPLETE
  MinimumHealthyHostsType_FLEET_PERCENT,
  MinimumHealthyHostsType_HOST_COUNT,
  MinimumHealthyHostsType'
  #-}