{-# 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.SnowDeviceManagement.Types.IpAddressAssignment
-- 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.SnowDeviceManagement.Types.IpAddressAssignment
  ( IpAddressAssignment
      ( ..,
        IpAddressAssignment_DHCP,
        IpAddressAssignment_STATIC
      ),
  )
where

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

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

pattern IpAddressAssignment_DHCP :: IpAddressAssignment
pattern $bIpAddressAssignment_DHCP :: IpAddressAssignment
$mIpAddressAssignment_DHCP :: forall r. IpAddressAssignment -> (Void# -> r) -> (Void# -> r) -> r
IpAddressAssignment_DHCP = IpAddressAssignment' "DHCP"

pattern IpAddressAssignment_STATIC :: IpAddressAssignment
pattern $bIpAddressAssignment_STATIC :: IpAddressAssignment
$mIpAddressAssignment_STATIC :: forall r. IpAddressAssignment -> (Void# -> r) -> (Void# -> r) -> r
IpAddressAssignment_STATIC = IpAddressAssignment' "STATIC"

{-# COMPLETE
  IpAddressAssignment_DHCP,
  IpAddressAssignment_STATIC,
  IpAddressAssignment'
  #-}