{- This file was auto-generated from tensorflow/core/framework/types.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, GeneralizedNewtypeDeriving, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude, DataKinds, BangPatterns, TypeApplications, OverloadedStrings, DerivingStrategies#-}
{-# OPTIONS_GHC -Wno-unused-imports#-}
{-# OPTIONS_GHC -Wno-duplicate-exports#-}
{-# OPTIONS_GHC -Wno-dodgy-exports#-}
module Proto.Tensorflow.Core.Framework.Types (
        DataType(..), DataType(), DataType'UnrecognizedValue
    ) where
import qualified Data.ProtoLens.Runtime.Control.DeepSeq as Control.DeepSeq
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Prism as Data.ProtoLens.Prism
import qualified Data.ProtoLens.Runtime.Prelude as Prelude
import qualified Data.ProtoLens.Runtime.Data.Int as Data.Int
import qualified Data.ProtoLens.Runtime.Data.Monoid as Data.Monoid
import qualified Data.ProtoLens.Runtime.Data.Word as Data.Word
import qualified Data.ProtoLens.Runtime.Data.ProtoLens as Data.ProtoLens
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Bytes as Data.ProtoLens.Encoding.Bytes
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Growing as Data.ProtoLens.Encoding.Growing
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Parser.Unsafe as Data.ProtoLens.Encoding.Parser.Unsafe
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Encoding.Wire as Data.ProtoLens.Encoding.Wire
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Field as Data.ProtoLens.Field
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum
import qualified Data.ProtoLens.Runtime.Data.ProtoLens.Service.Types as Data.ProtoLens.Service.Types
import qualified Data.ProtoLens.Runtime.Lens.Family2 as Lens.Family2
import qualified Data.ProtoLens.Runtime.Lens.Family2.Unchecked as Lens.Family2.Unchecked
import qualified Data.ProtoLens.Runtime.Data.Text as Data.Text
import qualified Data.ProtoLens.Runtime.Data.Map as Data.Map
import qualified Data.ProtoLens.Runtime.Data.ByteString as Data.ByteString
import qualified Data.ProtoLens.Runtime.Data.ByteString.Char8 as Data.ByteString.Char8
import qualified Data.ProtoLens.Runtime.Data.Text.Encoding as Data.Text.Encoding
import qualified Data.ProtoLens.Runtime.Data.Vector as Data.Vector
import qualified Data.ProtoLens.Runtime.Data.Vector.Generic as Data.Vector.Generic
import qualified Data.ProtoLens.Runtime.Data.Vector.Unboxed as Data.Vector.Unboxed
import qualified Data.ProtoLens.Runtime.Text.Read as Text.Read
newtype DataType'UnrecognizedValue
  = DataType'UnrecognizedValue Data.Int.Int32
  deriving stock (DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
(DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> Bool)
-> Eq DataType'UnrecognizedValue
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c/= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
== :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c== :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
Prelude.Eq, Eq DataType'UnrecognizedValue
Eq DataType'UnrecognizedValue =>
(DataType'UnrecognizedValue
 -> DataType'UnrecognizedValue -> Ordering)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> Bool)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> Bool)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> Bool)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> Bool)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> DataType'UnrecognizedValue)
-> (DataType'UnrecognizedValue
    -> DataType'UnrecognizedValue -> DataType'UnrecognizedValue)
-> Ord DataType'UnrecognizedValue
DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> Ordering
DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> DataType'UnrecognizedValue
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 :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> DataType'UnrecognizedValue
$cmin :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> DataType'UnrecognizedValue
max :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> DataType'UnrecognizedValue
$cmax :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> DataType'UnrecognizedValue
>= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c>= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
> :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c> :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
<= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c<= :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
< :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
$c< :: DataType'UnrecognizedValue -> DataType'UnrecognizedValue -> Bool
compare :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> Ordering
$ccompare :: DataType'UnrecognizedValue
-> DataType'UnrecognizedValue -> Ordering
$cp1Ord :: Eq DataType'UnrecognizedValue
Prelude.Ord, Int -> DataType'UnrecognizedValue -> ShowS
[DataType'UnrecognizedValue] -> ShowS
DataType'UnrecognizedValue -> String
(Int -> DataType'UnrecognizedValue -> ShowS)
-> (DataType'UnrecognizedValue -> String)
-> ([DataType'UnrecognizedValue] -> ShowS)
-> Show DataType'UnrecognizedValue
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataType'UnrecognizedValue] -> ShowS
$cshowList :: [DataType'UnrecognizedValue] -> ShowS
show :: DataType'UnrecognizedValue -> String
$cshow :: DataType'UnrecognizedValue -> String
showsPrec :: Int -> DataType'UnrecognizedValue -> ShowS
$cshowsPrec :: Int -> DataType'UnrecognizedValue -> ShowS
Prelude.Show)
data DataType
  = DT_INVALID |
    DT_FLOAT |
    DT_DOUBLE |
    DT_INT32 |
    DT_UINT8 |
    DT_INT16 |
    DT_INT8 |
    DT_STRING |
    DT_COMPLEX64 |
    DT_INT64 |
    DT_BOOL |
    DT_QINT8 |
    DT_QUINT8 |
    DT_QINT32 |
    DT_BFLOAT16 |
    DT_QINT16 |
    DT_QUINT16 |
    DT_UINT16 |
    DT_COMPLEX128 |
    DT_HALF |
    DT_RESOURCE |
    DT_VARIANT |
    DT_UINT32 |
    DT_UINT64 |
    DT_FLOAT_REF |
    DT_DOUBLE_REF |
    DT_INT32_REF |
    DT_UINT8_REF |
    DT_INT16_REF |
    DT_INT8_REF |
    DT_STRING_REF |
    DT_COMPLEX64_REF |
    DT_INT64_REF |
    DT_BOOL_REF |
    DT_QINT8_REF |
    DT_QUINT8_REF |
    DT_QINT32_REF |
    DT_BFLOAT16_REF |
    DT_QINT16_REF |
    DT_QUINT16_REF |
    DT_UINT16_REF |
    DT_COMPLEX128_REF |
    DT_HALF_REF |
    DT_RESOURCE_REF |
    DT_VARIANT_REF |
    DT_UINT32_REF |
    DT_UINT64_REF |
    DataType'Unrecognized !DataType'UnrecognizedValue
  deriving stock (Int -> DataType -> ShowS
[DataType] -> ShowS
DataType -> String
(Int -> DataType -> ShowS)
-> (DataType -> String) -> ([DataType] -> ShowS) -> Show DataType
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DataType] -> ShowS
$cshowList :: [DataType] -> ShowS
show :: DataType -> String
$cshow :: DataType -> String
showsPrec :: Int -> DataType -> ShowS
$cshowsPrec :: Int -> DataType -> ShowS
Prelude.Show, DataType -> DataType -> Bool
(DataType -> DataType -> Bool)
-> (DataType -> DataType -> Bool) -> Eq DataType
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DataType -> DataType -> Bool
$c/= :: DataType -> DataType -> Bool
== :: DataType -> DataType -> Bool
$c== :: DataType -> DataType -> Bool
Prelude.Eq, Eq DataType
Eq DataType =>
(DataType -> DataType -> Ordering)
-> (DataType -> DataType -> Bool)
-> (DataType -> DataType -> Bool)
-> (DataType -> DataType -> Bool)
-> (DataType -> DataType -> Bool)
-> (DataType -> DataType -> DataType)
-> (DataType -> DataType -> DataType)
-> Ord DataType
DataType -> DataType -> Bool
DataType -> DataType -> Ordering
DataType -> DataType -> DataType
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 :: DataType -> DataType -> DataType
$cmin :: DataType -> DataType -> DataType
max :: DataType -> DataType -> DataType
$cmax :: DataType -> DataType -> DataType
>= :: DataType -> DataType -> Bool
$c>= :: DataType -> DataType -> Bool
> :: DataType -> DataType -> Bool
$c> :: DataType -> DataType -> Bool
<= :: DataType -> DataType -> Bool
$c<= :: DataType -> DataType -> Bool
< :: DataType -> DataType -> Bool
$c< :: DataType -> DataType -> Bool
compare :: DataType -> DataType -> Ordering
$ccompare :: DataType -> DataType -> Ordering
$cp1Ord :: Eq DataType
Prelude.Ord)
instance Data.ProtoLens.MessageEnum DataType where
  maybeToEnum :: Int -> Maybe DataType
maybeToEnum 0 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INVALID
  maybeToEnum 1 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_FLOAT
  maybeToEnum 2 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_DOUBLE
  maybeToEnum 3 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT32
  maybeToEnum 4 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT8
  maybeToEnum 5 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT16
  maybeToEnum 6 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT8
  maybeToEnum 7 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_STRING
  maybeToEnum 8 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX64
  maybeToEnum 9 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT64
  maybeToEnum 10 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BOOL
  maybeToEnum 11 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT8
  maybeToEnum 12 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT8
  maybeToEnum 13 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT32
  maybeToEnum 14 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BFLOAT16
  maybeToEnum 15 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT16
  maybeToEnum 16 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT16
  maybeToEnum 17 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT16
  maybeToEnum 18 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX128
  maybeToEnum 19 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_HALF
  maybeToEnum 20 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_RESOURCE
  maybeToEnum 21 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_VARIANT
  maybeToEnum 22 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT32
  maybeToEnum 23 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT64
  maybeToEnum 101 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_FLOAT_REF
  maybeToEnum 102 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_DOUBLE_REF
  maybeToEnum 103 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT32_REF
  maybeToEnum 104 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT8_REF
  maybeToEnum 105 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT16_REF
  maybeToEnum 106 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT8_REF
  maybeToEnum 107 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_STRING_REF
  maybeToEnum 108 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX64_REF
  maybeToEnum 109 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT64_REF
  maybeToEnum 110 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BOOL_REF
  maybeToEnum 111 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT8_REF
  maybeToEnum 112 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT8_REF
  maybeToEnum 113 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT32_REF
  maybeToEnum 114 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BFLOAT16_REF
  maybeToEnum 115 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT16_REF
  maybeToEnum 116 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT16_REF
  maybeToEnum 117 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT16_REF
  maybeToEnum 118 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX128_REF
  maybeToEnum 119 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_HALF_REF
  maybeToEnum 120 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_RESOURCE_REF
  maybeToEnum 121 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_VARIANT_REF
  maybeToEnum 122 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT32_REF
  maybeToEnum 123 = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT64_REF
  maybeToEnum k :: Int
k
    = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just
        (DataType'UnrecognizedValue -> DataType
DataType'Unrecognized
           (Int32 -> DataType'UnrecognizedValue
DataType'UnrecognizedValue (Int -> Int32
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int
k)))
  showEnum :: DataType -> String
showEnum DT_INVALID = "DT_INVALID"
  showEnum DT_FLOAT = "DT_FLOAT"
  showEnum DT_DOUBLE = "DT_DOUBLE"
  showEnum DT_INT32 = "DT_INT32"
  showEnum DT_UINT8 = "DT_UINT8"
  showEnum DT_INT16 = "DT_INT16"
  showEnum DT_INT8 = "DT_INT8"
  showEnum DT_STRING = "DT_STRING"
  showEnum DT_COMPLEX64 = "DT_COMPLEX64"
  showEnum DT_INT64 = "DT_INT64"
  showEnum DT_BOOL = "DT_BOOL"
  showEnum DT_QINT8 = "DT_QINT8"
  showEnum DT_QUINT8 = "DT_QUINT8"
  showEnum DT_QINT32 = "DT_QINT32"
  showEnum DT_BFLOAT16 = "DT_BFLOAT16"
  showEnum DT_QINT16 = "DT_QINT16"
  showEnum DT_QUINT16 = "DT_QUINT16"
  showEnum DT_UINT16 = "DT_UINT16"
  showEnum DT_COMPLEX128 = "DT_COMPLEX128"
  showEnum DT_HALF = "DT_HALF"
  showEnum DT_RESOURCE = "DT_RESOURCE"
  showEnum DT_VARIANT = "DT_VARIANT"
  showEnum DT_UINT32 = "DT_UINT32"
  showEnum DT_UINT64 = "DT_UINT64"
  showEnum DT_FLOAT_REF = "DT_FLOAT_REF"
  showEnum DT_DOUBLE_REF = "DT_DOUBLE_REF"
  showEnum DT_INT32_REF = "DT_INT32_REF"
  showEnum DT_UINT8_REF = "DT_UINT8_REF"
  showEnum DT_INT16_REF = "DT_INT16_REF"
  showEnum DT_INT8_REF = "DT_INT8_REF"
  showEnum DT_STRING_REF = "DT_STRING_REF"
  showEnum DT_COMPLEX64_REF = "DT_COMPLEX64_REF"
  showEnum DT_INT64_REF = "DT_INT64_REF"
  showEnum DT_BOOL_REF = "DT_BOOL_REF"
  showEnum DT_QINT8_REF = "DT_QINT8_REF"
  showEnum DT_QUINT8_REF = "DT_QUINT8_REF"
  showEnum DT_QINT32_REF = "DT_QINT32_REF"
  showEnum DT_BFLOAT16_REF = "DT_BFLOAT16_REF"
  showEnum DT_QINT16_REF = "DT_QINT16_REF"
  showEnum DT_QUINT16_REF = "DT_QUINT16_REF"
  showEnum DT_UINT16_REF = "DT_UINT16_REF"
  showEnum DT_COMPLEX128_REF = "DT_COMPLEX128_REF"
  showEnum DT_HALF_REF = "DT_HALF_REF"
  showEnum DT_RESOURCE_REF = "DT_RESOURCE_REF"
  showEnum DT_VARIANT_REF = "DT_VARIANT_REF"
  showEnum DT_UINT32_REF = "DT_UINT32_REF"
  showEnum DT_UINT64_REF = "DT_UINT64_REF"
  showEnum (DataType'Unrecognized (DataType'UnrecognizedValue k :: Int32
k))
    = Int32 -> String
forall a. Show a => a -> String
Prelude.show Int32
k
  readEnum :: String -> Maybe DataType
readEnum k :: String
k
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INVALID" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INVALID
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_FLOAT" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_FLOAT
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_DOUBLE" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_DOUBLE
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT32" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT32
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT8" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT8
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT16" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT16
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT8" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT8
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_STRING" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_STRING
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_COMPLEX64" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX64
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT64" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT64
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_BOOL" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BOOL
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT8" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT8
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QUINT8" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT8
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT32" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT32
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_BFLOAT16" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BFLOAT16
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT16" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT16
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QUINT16" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT16
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT16" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT16
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_COMPLEX128" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX128
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_HALF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_HALF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_RESOURCE" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_RESOURCE
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_VARIANT" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_VARIANT
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT32" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT32
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT64" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT64
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_FLOAT_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_FLOAT_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_DOUBLE_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_DOUBLE_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT32_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT32_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT8_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT8_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT16_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT16_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT8_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT8_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_STRING_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_STRING_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_COMPLEX64_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX64_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_INT64_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_INT64_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_BOOL_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BOOL_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT8_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT8_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QUINT8_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT8_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT32_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT32_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_BFLOAT16_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_BFLOAT16_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QINT16_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QINT16_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_QUINT16_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_QUINT16_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT16_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT16_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_COMPLEX128_REF"
    = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_COMPLEX128_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_HALF_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_HALF_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_RESOURCE_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_RESOURCE_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_VARIANT_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_VARIANT_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT32_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT32_REF
    | String -> String -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) String
k "DT_UINT64_REF" = DataType -> Maybe DataType
forall a. a -> Maybe a
Prelude.Just DataType
DT_UINT64_REF
    | Bool
Prelude.otherwise
    = Maybe Int -> (Int -> Maybe DataType) -> Maybe DataType
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
(Prelude.>>=) (String -> Maybe Int
forall a. Read a => String -> Maybe a
Text.Read.readMaybe String
k) Int -> Maybe DataType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum
instance Prelude.Bounded DataType where
  minBound :: DataType
minBound = DataType
DT_INVALID
  maxBound :: DataType
maxBound = DataType
DT_UINT64_REF
instance Prelude.Enum DataType where
  toEnum :: Int -> DataType
toEnum k__ :: Int
k__
    = DataType -> (DataType -> DataType) -> Maybe DataType -> DataType
forall b a. b -> (a -> b) -> Maybe a -> b
Prelude.maybe
        (String -> DataType
forall a. HasCallStack => String -> a
Prelude.error
           (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
              "toEnum: unknown value for enum DataType: " (Int -> String
forall a. Show a => a -> String
Prelude.show Int
k__)))
        DataType -> DataType
forall a. a -> a
Prelude.id
        (Int -> Maybe DataType
forall a. MessageEnum a => Int -> Maybe a
Data.ProtoLens.maybeToEnum Int
k__)
  fromEnum :: DataType -> Int
fromEnum DT_INVALID = 0
  fromEnum DT_FLOAT = 1
  fromEnum DT_DOUBLE = 2
  fromEnum DT_INT32 = 3
  fromEnum DT_UINT8 = 4
  fromEnum DT_INT16 = 5
  fromEnum DT_INT8 = 6
  fromEnum DT_STRING = 7
  fromEnum DT_COMPLEX64 = 8
  fromEnum DT_INT64 = 9
  fromEnum DT_BOOL = 10
  fromEnum DT_QINT8 = 11
  fromEnum DT_QUINT8 = 12
  fromEnum DT_QINT32 = 13
  fromEnum DT_BFLOAT16 = 14
  fromEnum DT_QINT16 = 15
  fromEnum DT_QUINT16 = 16
  fromEnum DT_UINT16 = 17
  fromEnum DT_COMPLEX128 = 18
  fromEnum DT_HALF = 19
  fromEnum DT_RESOURCE = 20
  fromEnum DT_VARIANT = 21
  fromEnum DT_UINT32 = 22
  fromEnum DT_UINT64 = 23
  fromEnum DT_FLOAT_REF = 101
  fromEnum DT_DOUBLE_REF = 102
  fromEnum DT_INT32_REF = 103
  fromEnum DT_UINT8_REF = 104
  fromEnum DT_INT16_REF = 105
  fromEnum DT_INT8_REF = 106
  fromEnum DT_STRING_REF = 107
  fromEnum DT_COMPLEX64_REF = 108
  fromEnum DT_INT64_REF = 109
  fromEnum DT_BOOL_REF = 110
  fromEnum DT_QINT8_REF = 111
  fromEnum DT_QUINT8_REF = 112
  fromEnum DT_QINT32_REF = 113
  fromEnum DT_BFLOAT16_REF = 114
  fromEnum DT_QINT16_REF = 115
  fromEnum DT_QUINT16_REF = 116
  fromEnum DT_UINT16_REF = 117
  fromEnum DT_COMPLEX128_REF = 118
  fromEnum DT_HALF_REF = 119
  fromEnum DT_RESOURCE_REF = 120
  fromEnum DT_VARIANT_REF = 121
  fromEnum DT_UINT32_REF = 122
  fromEnum DT_UINT64_REF = 123
  fromEnum (DataType'Unrecognized (DataType'UnrecognizedValue k :: Int32
k))
    = Int32 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Int32
k
  succ :: DataType -> DataType
succ DT_UINT64_REF
    = String -> DataType
forall a. HasCallStack => String -> a
Prelude.error
        "DataType.succ: bad argument DT_UINT64_REF. This value would be out of bounds."
  succ DT_INVALID = DataType
DT_FLOAT
  succ DT_FLOAT = DataType
DT_DOUBLE
  succ DT_DOUBLE = DataType
DT_INT32
  succ DT_INT32 = DataType
DT_UINT8
  succ DT_UINT8 = DataType
DT_INT16
  succ DT_INT16 = DataType
DT_INT8
  succ DT_INT8 = DataType
DT_STRING
  succ DT_STRING = DataType
DT_COMPLEX64
  succ DT_COMPLEX64 = DataType
DT_INT64
  succ DT_INT64 = DataType
DT_BOOL
  succ DT_BOOL = DataType
DT_QINT8
  succ DT_QINT8 = DataType
DT_QUINT8
  succ DT_QUINT8 = DataType
DT_QINT32
  succ DT_QINT32 = DataType
DT_BFLOAT16
  succ DT_BFLOAT16 = DataType
DT_QINT16
  succ DT_QINT16 = DataType
DT_QUINT16
  succ DT_QUINT16 = DataType
DT_UINT16
  succ DT_UINT16 = DataType
DT_COMPLEX128
  succ DT_COMPLEX128 = DataType
DT_HALF
  succ DT_HALF = DataType
DT_RESOURCE
  succ DT_RESOURCE = DataType
DT_VARIANT
  succ DT_VARIANT = DataType
DT_UINT32
  succ DT_UINT32 = DataType
DT_UINT64
  succ DT_UINT64 = DataType
DT_FLOAT_REF
  succ DT_FLOAT_REF = DataType
DT_DOUBLE_REF
  succ DT_DOUBLE_REF = DataType
DT_INT32_REF
  succ DT_INT32_REF = DataType
DT_UINT8_REF
  succ DT_UINT8_REF = DataType
DT_INT16_REF
  succ DT_INT16_REF = DataType
DT_INT8_REF
  succ DT_INT8_REF = DataType
DT_STRING_REF
  succ DT_STRING_REF = DataType
DT_COMPLEX64_REF
  succ DT_COMPLEX64_REF = DataType
DT_INT64_REF
  succ DT_INT64_REF = DataType
DT_BOOL_REF
  succ DT_BOOL_REF = DataType
DT_QINT8_REF
  succ DT_QINT8_REF = DataType
DT_QUINT8_REF
  succ DT_QUINT8_REF = DataType
DT_QINT32_REF
  succ DT_QINT32_REF = DataType
DT_BFLOAT16_REF
  succ DT_BFLOAT16_REF = DataType
DT_QINT16_REF
  succ DT_QINT16_REF = DataType
DT_QUINT16_REF
  succ DT_QUINT16_REF = DataType
DT_UINT16_REF
  succ DT_UINT16_REF = DataType
DT_COMPLEX128_REF
  succ DT_COMPLEX128_REF = DataType
DT_HALF_REF
  succ DT_HALF_REF = DataType
DT_RESOURCE_REF
  succ DT_RESOURCE_REF = DataType
DT_VARIANT_REF
  succ DT_VARIANT_REF = DataType
DT_UINT32_REF
  succ DT_UINT32_REF = DataType
DT_UINT64_REF
  succ (DataType'Unrecognized _)
    = String -> DataType
forall a. HasCallStack => String -> a
Prelude.error "DataType.succ: bad argument: unrecognized value"
  pred :: DataType -> DataType
pred DT_INVALID
    = String -> DataType
forall a. HasCallStack => String -> a
Prelude.error
        "DataType.pred: bad argument DT_INVALID. This value would be out of bounds."
  pred DT_FLOAT = DataType
DT_INVALID
  pred DT_DOUBLE = DataType
DT_FLOAT
  pred DT_INT32 = DataType
DT_DOUBLE
  pred DT_UINT8 = DataType
DT_INT32
  pred DT_INT16 = DataType
DT_UINT8
  pred DT_INT8 = DataType
DT_INT16
  pred DT_STRING = DataType
DT_INT8
  pred DT_COMPLEX64 = DataType
DT_STRING
  pred DT_INT64 = DataType
DT_COMPLEX64
  pred DT_BOOL = DataType
DT_INT64
  pred DT_QINT8 = DataType
DT_BOOL
  pred DT_QUINT8 = DataType
DT_QINT8
  pred DT_QINT32 = DataType
DT_QUINT8
  pred DT_BFLOAT16 = DataType
DT_QINT32
  pred DT_QINT16 = DataType
DT_BFLOAT16
  pred DT_QUINT16 = DataType
DT_QINT16
  pred DT_UINT16 = DataType
DT_QUINT16
  pred DT_COMPLEX128 = DataType
DT_UINT16
  pred DT_HALF = DataType
DT_COMPLEX128
  pred DT_RESOURCE = DataType
DT_HALF
  pred DT_VARIANT = DataType
DT_RESOURCE
  pred DT_UINT32 = DataType
DT_VARIANT
  pred DT_UINT64 = DataType
DT_UINT32
  pred DT_FLOAT_REF = DataType
DT_UINT64
  pred DT_DOUBLE_REF = DataType
DT_FLOAT_REF
  pred DT_INT32_REF = DataType
DT_DOUBLE_REF
  pred DT_UINT8_REF = DataType
DT_INT32_REF
  pred DT_INT16_REF = DataType
DT_UINT8_REF
  pred DT_INT8_REF = DataType
DT_INT16_REF
  pred DT_STRING_REF = DataType
DT_INT8_REF
  pred DT_COMPLEX64_REF = DataType
DT_STRING_REF
  pred DT_INT64_REF = DataType
DT_COMPLEX64_REF
  pred DT_BOOL_REF = DataType
DT_INT64_REF
  pred DT_QINT8_REF = DataType
DT_BOOL_REF
  pred DT_QUINT8_REF = DataType
DT_QINT8_REF
  pred DT_QINT32_REF = DataType
DT_QUINT8_REF
  pred DT_BFLOAT16_REF = DataType
DT_QINT32_REF
  pred DT_QINT16_REF = DataType
DT_BFLOAT16_REF
  pred DT_QUINT16_REF = DataType
DT_QINT16_REF
  pred DT_UINT16_REF = DataType
DT_QUINT16_REF
  pred DT_COMPLEX128_REF = DataType
DT_UINT16_REF
  pred DT_HALF_REF = DataType
DT_COMPLEX128_REF
  pred DT_RESOURCE_REF = DataType
DT_HALF_REF
  pred DT_VARIANT_REF = DataType
DT_RESOURCE_REF
  pred DT_UINT32_REF = DataType
DT_VARIANT_REF
  pred DT_UINT64_REF = DataType
DT_UINT32_REF
  pred (DataType'Unrecognized _)
    = String -> DataType
forall a. HasCallStack => String -> a
Prelude.error "DataType.pred: bad argument: unrecognized value"
  enumFrom :: DataType -> [DataType]
enumFrom = DataType -> [DataType]
forall a. (Enum a, Bounded a) => a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFrom
  enumFromTo :: DataType -> DataType -> [DataType]
enumFromTo = DataType -> DataType -> [DataType]
forall a. Enum a => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromTo
  enumFromThen :: DataType -> DataType -> [DataType]
enumFromThen = DataType -> DataType -> [DataType]
forall a. (Enum a, Bounded a) => a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThen
  enumFromThenTo :: DataType -> DataType -> DataType -> [DataType]
enumFromThenTo = DataType -> DataType -> DataType -> [DataType]
forall a. Enum a => a -> a -> a -> [a]
Data.ProtoLens.Message.Enum.messageEnumFromThenTo
instance Data.ProtoLens.FieldDefault DataType where
  fieldDefault :: DataType
fieldDefault = DataType
DT_INVALID
instance Control.DeepSeq.NFData DataType where
  rnf :: DataType -> ()
rnf x__ :: DataType
x__ = DataType -> () -> ()
forall a b. a -> b -> b
Prelude.seq DataType
x__ ()