{-# 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.EC2.Types.DiskImageFormat
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Amazonka.EC2.Types.DiskImageFormat
  ( DiskImageFormat
      ( ..,
        DiskImageFormat_RAW,
        DiskImageFormat_VHD,
        DiskImageFormat_VMDK
      ),
  )
where

import qualified Amazonka.Core as Core
import qualified Amazonka.Data as Data
import Amazonka.EC2.Internal
import qualified Amazonka.Prelude as Prelude

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

pattern DiskImageFormat_RAW :: DiskImageFormat
pattern $bDiskImageFormat_RAW :: DiskImageFormat
$mDiskImageFormat_RAW :: forall {r}. DiskImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
DiskImageFormat_RAW = DiskImageFormat' "RAW"

pattern DiskImageFormat_VHD :: DiskImageFormat
pattern $bDiskImageFormat_VHD :: DiskImageFormat
$mDiskImageFormat_VHD :: forall {r}. DiskImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
DiskImageFormat_VHD = DiskImageFormat' "VHD"

pattern DiskImageFormat_VMDK :: DiskImageFormat
pattern $bDiskImageFormat_VMDK :: DiskImageFormat
$mDiskImageFormat_VMDK :: forall {r}. DiskImageFormat -> ((# #) -> r) -> ((# #) -> r) -> r
DiskImageFormat_VMDK = DiskImageFormat' "VMDK"

{-# COMPLETE
  DiskImageFormat_RAW,
  DiskImageFormat_VHD,
  DiskImageFormat_VMDK,
  DiskImageFormat'
  #-}