{-# 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.ECS.Types.NetworkMode
-- 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.ECS.Types.NetworkMode
  ( NetworkMode
      ( ..,
        NetworkMode_Awsvpc,
        NetworkMode_Bridge,
        NetworkMode_Host,
        NetworkMode_None
      ),
  )
where

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

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

pattern NetworkMode_Awsvpc :: NetworkMode
pattern $bNetworkMode_Awsvpc :: NetworkMode
$mNetworkMode_Awsvpc :: forall r. NetworkMode -> (Void# -> r) -> (Void# -> r) -> r
NetworkMode_Awsvpc = NetworkMode' "awsvpc"

pattern NetworkMode_Bridge :: NetworkMode
pattern $bNetworkMode_Bridge :: NetworkMode
$mNetworkMode_Bridge :: forall r. NetworkMode -> (Void# -> r) -> (Void# -> r) -> r
NetworkMode_Bridge = NetworkMode' "bridge"

pattern NetworkMode_Host :: NetworkMode
pattern $bNetworkMode_Host :: NetworkMode
$mNetworkMode_Host :: forall r. NetworkMode -> (Void# -> r) -> (Void# -> r) -> r
NetworkMode_Host = NetworkMode' "host"

pattern NetworkMode_None :: NetworkMode
pattern $bNetworkMode_None :: NetworkMode
$mNetworkMode_None :: forall r. NetworkMode -> (Void# -> r) -> (Void# -> r) -> r
NetworkMode_None = NetworkMode' "none"

{-# COMPLETE
  NetworkMode_Awsvpc,
  NetworkMode_Bridge,
  NetworkMode_Host,
  NetworkMode_None,
  NetworkMode'
  #-}