{- This file was auto-generated from tensorflow/core/protobuf/tensor_bundle.proto by the proto-lens-protoc program. -} {-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies, UndecidableInstances, MultiParamTypeClasses, FlexibleContexts, FlexibleInstances, PatternSynonyms, MagicHash, NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports#-} module Proto.Tensorflow.Core.Protobuf.TensorBundle where import qualified Data.ProtoLens.Reexport.Prelude as Prelude import qualified Data.ProtoLens.Reexport.Data.Int as Data.Int import qualified Data.ProtoLens.Reexport.Data.Word as Data.Word import qualified Data.ProtoLens.Reexport.Data.ProtoLens as Data.ProtoLens import qualified Data.ProtoLens.Reexport.Data.ProtoLens.Message.Enum as Data.ProtoLens.Message.Enum import qualified Data.ProtoLens.Reexport.Lens.Family2 as Lens.Family2 import qualified Data.ProtoLens.Reexport.Lens.Family2.Unchecked as Lens.Family2.Unchecked import qualified Data.ProtoLens.Reexport.Data.Default.Class as Data.Default.Class import qualified Data.ProtoLens.Reexport.Data.Text as Data.Text import qualified Data.ProtoLens.Reexport.Data.Map as Data.Map import qualified Data.ProtoLens.Reexport.Data.ByteString as Data.ByteString import qualified Data.ProtoLens.Reexport.Lens.Labels as Lens.Labels import qualified Proto.Tensorflow.Core.Framework.TensorShape import qualified Proto.Tensorflow.Core.Framework.TensorSlice import qualified Proto.Tensorflow.Core.Framework.Types import qualified Proto.Tensorflow.Core.Framework.Versions data BundleEntryProto = BundleEntryProto{_BundleEntryProto'dtype :: !Proto.Tensorflow.Core.Framework.Types.DataType, _BundleEntryProto'shape :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto), _BundleEntryProto'shardId :: !Data.Int.Int32, _BundleEntryProto'offset :: !Data.Int.Int64, _BundleEntryProto'size :: !Data.Int.Int64, _BundleEntryProto'crc32c :: !Data.Word.Word32, _BundleEntryProto'slices :: ![Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto]} deriving (Prelude.Show, Prelude.Eq, Prelude.Ord) instance (a ~ Proto.Tensorflow.Core.Framework.Types.DataType, b ~ Proto.Tensorflow.Core.Framework.Types.DataType, Prelude.Functor f) => Lens.Labels.HasLens "dtype" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'dtype (\ x__ y__ -> x__{_BundleEntryProto'dtype = y__})) Prelude.id instance (a ~ Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto, b ~ Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto, Prelude.Functor f) => Lens.Labels.HasLens "shape" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'shape (\ x__ y__ -> x__{_BundleEntryProto'shape = y__})) (Data.ProtoLens.maybeLens Data.Default.Class.def) instance (a ~ Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto, b ~ Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto, Prelude.Functor f) => Lens.Labels.HasLens "maybe'shape" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'shape (\ x__ y__ -> x__{_BundleEntryProto'shape = y__})) Prelude.id instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32, Prelude.Functor f) => Lens.Labels.HasLens "shardId" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'shardId (\ x__ y__ -> x__{_BundleEntryProto'shardId = y__})) Prelude.id instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64, Prelude.Functor f) => Lens.Labels.HasLens "offset" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'offset (\ x__ y__ -> x__{_BundleEntryProto'offset = y__})) Prelude.id instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64, Prelude.Functor f) => Lens.Labels.HasLens "size" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'size (\ x__ y__ -> x__{_BundleEntryProto'size = y__})) Prelude.id instance (a ~ Data.Word.Word32, b ~ Data.Word.Word32, Prelude.Functor f) => Lens.Labels.HasLens "crc32c" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'crc32c (\ x__ y__ -> x__{_BundleEntryProto'crc32c = y__})) Prelude.id instance (a ~ [Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto], b ~ [Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto], Prelude.Functor f) => Lens.Labels.HasLens "slices" f BundleEntryProto BundleEntryProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleEntryProto'slices (\ x__ y__ -> x__{_BundleEntryProto'slices = y__})) Prelude.id instance Data.Default.Class.Default BundleEntryProto where def = BundleEntryProto{_BundleEntryProto'dtype = Data.Default.Class.def, _BundleEntryProto'shape = Prelude.Nothing, _BundleEntryProto'shardId = Data.ProtoLens.fieldDefault, _BundleEntryProto'offset = Data.ProtoLens.fieldDefault, _BundleEntryProto'size = Data.ProtoLens.fieldDefault, _BundleEntryProto'crc32c = Data.ProtoLens.fieldDefault, _BundleEntryProto'slices = []} instance Data.ProtoLens.Message BundleEntryProto where descriptor = let dtype__field_descriptor = Data.ProtoLens.FieldDescriptor "dtype" (Data.ProtoLens.EnumField :: Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Types.DataType) (Data.ProtoLens.PlainField Data.ProtoLens.Optional dtype) :: Data.ProtoLens.FieldDescriptor BundleEntryProto shape__field_descriptor = Data.ProtoLens.FieldDescriptor "shape" (Data.ProtoLens.MessageField :: Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto) (Data.ProtoLens.OptionalField maybe'shape) :: Data.ProtoLens.FieldDescriptor BundleEntryProto shardId__field_descriptor = Data.ProtoLens.FieldDescriptor "shard_id" (Data.ProtoLens.Int32Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32) (Data.ProtoLens.PlainField Data.ProtoLens.Optional shardId) :: Data.ProtoLens.FieldDescriptor BundleEntryProto offset__field_descriptor = Data.ProtoLens.FieldDescriptor "offset" (Data.ProtoLens.Int64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional offset) :: Data.ProtoLens.FieldDescriptor BundleEntryProto size__field_descriptor = Data.ProtoLens.FieldDescriptor "size" (Data.ProtoLens.Int64Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64) (Data.ProtoLens.PlainField Data.ProtoLens.Optional size) :: Data.ProtoLens.FieldDescriptor BundleEntryProto crc32c__field_descriptor = Data.ProtoLens.FieldDescriptor "crc32c" (Data.ProtoLens.Fixed32Field :: Data.ProtoLens.FieldTypeDescriptor Data.Word.Word32) (Data.ProtoLens.PlainField Data.ProtoLens.Optional crc32c) :: Data.ProtoLens.FieldDescriptor BundleEntryProto slices__field_descriptor = Data.ProtoLens.FieldDescriptor "slices" (Data.ProtoLens.MessageField :: Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorSlice.TensorSliceProto) (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked slices) :: Data.ProtoLens.FieldDescriptor BundleEntryProto in Data.ProtoLens.MessageDescriptor (Data.Text.pack "tensorflow.BundleEntryProto") (Data.Map.fromList [(Data.ProtoLens.Tag 1, dtype__field_descriptor), (Data.ProtoLens.Tag 2, shape__field_descriptor), (Data.ProtoLens.Tag 3, shardId__field_descriptor), (Data.ProtoLens.Tag 4, offset__field_descriptor), (Data.ProtoLens.Tag 5, size__field_descriptor), (Data.ProtoLens.Tag 6, crc32c__field_descriptor), (Data.ProtoLens.Tag 7, slices__field_descriptor)]) (Data.Map.fromList [("dtype", dtype__field_descriptor), ("shape", shape__field_descriptor), ("shard_id", shardId__field_descriptor), ("offset", offset__field_descriptor), ("size", size__field_descriptor), ("crc32c", crc32c__field_descriptor), ("slices", slices__field_descriptor)]) data BundleHeaderProto = BundleHeaderProto{_BundleHeaderProto'numShards :: !Data.Int.Int32, _BundleHeaderProto'endianness :: !BundleHeaderProto'Endianness, _BundleHeaderProto'version :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.Versions.VersionDef)} deriving (Prelude.Show, Prelude.Eq, Prelude.Ord) instance (a ~ Data.Int.Int32, b ~ Data.Int.Int32, Prelude.Functor f) => Lens.Labels.HasLens "numShards" f BundleHeaderProto BundleHeaderProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleHeaderProto'numShards (\ x__ y__ -> x__{_BundleHeaderProto'numShards = y__})) Prelude.id instance (a ~ BundleHeaderProto'Endianness, b ~ BundleHeaderProto'Endianness, Prelude.Functor f) => Lens.Labels.HasLens "endianness" f BundleHeaderProto BundleHeaderProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleHeaderProto'endianness (\ x__ y__ -> x__{_BundleHeaderProto'endianness = y__})) Prelude.id instance (a ~ Proto.Tensorflow.Core.Framework.Versions.VersionDef, b ~ Proto.Tensorflow.Core.Framework.Versions.VersionDef, Prelude.Functor f) => Lens.Labels.HasLens "version" f BundleHeaderProto BundleHeaderProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleHeaderProto'version (\ x__ y__ -> x__{_BundleHeaderProto'version = y__})) (Data.ProtoLens.maybeLens Data.Default.Class.def) instance (a ~ Prelude.Maybe Proto.Tensorflow.Core.Framework.Versions.VersionDef, b ~ Prelude.Maybe Proto.Tensorflow.Core.Framework.Versions.VersionDef, Prelude.Functor f) => Lens.Labels.HasLens "maybe'version" f BundleHeaderProto BundleHeaderProto a b where lensOf _ = (Prelude..) (Lens.Family2.Unchecked.lens _BundleHeaderProto'version (\ x__ y__ -> x__{_BundleHeaderProto'version = y__})) Prelude.id instance Data.Default.Class.Default BundleHeaderProto where def = BundleHeaderProto{_BundleHeaderProto'numShards = Data.ProtoLens.fieldDefault, _BundleHeaderProto'endianness = Data.Default.Class.def, _BundleHeaderProto'version = Prelude.Nothing} instance Data.ProtoLens.Message BundleHeaderProto where descriptor = let numShards__field_descriptor = Data.ProtoLens.FieldDescriptor "num_shards" (Data.ProtoLens.Int32Field :: Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32) (Data.ProtoLens.PlainField Data.ProtoLens.Optional numShards) :: Data.ProtoLens.FieldDescriptor BundleHeaderProto endianness__field_descriptor = Data.ProtoLens.FieldDescriptor "endianness" (Data.ProtoLens.EnumField :: Data.ProtoLens.FieldTypeDescriptor BundleHeaderProto'Endianness) (Data.ProtoLens.PlainField Data.ProtoLens.Optional endianness) :: Data.ProtoLens.FieldDescriptor BundleHeaderProto version__field_descriptor = Data.ProtoLens.FieldDescriptor "version" (Data.ProtoLens.MessageField :: Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Versions.VersionDef) (Data.ProtoLens.OptionalField maybe'version) :: Data.ProtoLens.FieldDescriptor BundleHeaderProto in Data.ProtoLens.MessageDescriptor (Data.Text.pack "tensorflow.BundleHeaderProto") (Data.Map.fromList [(Data.ProtoLens.Tag 1, numShards__field_descriptor), (Data.ProtoLens.Tag 2, endianness__field_descriptor), (Data.ProtoLens.Tag 3, version__field_descriptor)]) (Data.Map.fromList [("num_shards", numShards__field_descriptor), ("endianness", endianness__field_descriptor), ("version", version__field_descriptor)]) data BundleHeaderProto'Endianness = BundleHeaderProto'LITTLE | BundleHeaderProto'BIG deriving (Prelude.Show, Prelude.Eq, Prelude.Ord) instance Data.Default.Class.Default BundleHeaderProto'Endianness where def = BundleHeaderProto'LITTLE instance Data.ProtoLens.FieldDefault BundleHeaderProto'Endianness where fieldDefault = BundleHeaderProto'LITTLE instance Data.ProtoLens.MessageEnum BundleHeaderProto'Endianness where maybeToEnum 0 = Prelude.Just BundleHeaderProto'LITTLE maybeToEnum 1 = Prelude.Just BundleHeaderProto'BIG maybeToEnum _ = Prelude.Nothing showEnum BundleHeaderProto'LITTLE = "LITTLE" showEnum BundleHeaderProto'BIG = "BIG" readEnum "LITTLE" = Prelude.Just BundleHeaderProto'LITTLE readEnum "BIG" = Prelude.Just BundleHeaderProto'BIG readEnum _ = Prelude.Nothing instance Prelude.Enum BundleHeaderProto'Endianness where toEnum k__ = Prelude.maybe (Prelude.error ((Prelude.++) "toEnum: unknown value for enum Endianness: " (Prelude.show k__))) Prelude.id (Data.ProtoLens.maybeToEnum k__) fromEnum BundleHeaderProto'LITTLE = 0 fromEnum BundleHeaderProto'BIG = 1 succ BundleHeaderProto'BIG = Prelude.error "BundleHeaderProto'Endianness.succ: bad argument BundleHeaderProto'BIG. This value would be out of bounds." succ BundleHeaderProto'LITTLE = BundleHeaderProto'BIG pred BundleHeaderProto'LITTLE = Prelude.error "BundleHeaderProto'Endianness.pred: bad argument BundleHeaderProto'LITTLE. This value would be out of bounds." pred BundleHeaderProto'BIG = BundleHeaderProto'LITTLE enumFrom = Data.ProtoLens.Message.Enum.messageEnumFrom enumFromTo = Data.ProtoLens.Message.Enum.messageEnumFromTo enumFromThen = Data.ProtoLens.Message.Enum.messageEnumFromThen enumFromThenTo = Data.ProtoLens.Message.Enum.messageEnumFromThenTo instance Prelude.Bounded BundleHeaderProto'Endianness where minBound = BundleHeaderProto'LITTLE maxBound = BundleHeaderProto'BIG crc32c :: forall f s t a b . (Lens.Labels.HasLens "crc32c" f s t a b) => Lens.Family2.LensLike f s t a b crc32c = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "crc32c") dtype :: forall f s t a b . (Lens.Labels.HasLens "dtype" f s t a b) => Lens.Family2.LensLike f s t a b dtype = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dtype") endianness :: forall f s t a b . (Lens.Labels.HasLens "endianness" f s t a b) => Lens.Family2.LensLike f s t a b endianness = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "endianness") maybe'shape :: forall f s t a b . (Lens.Labels.HasLens "maybe'shape" f s t a b) => Lens.Family2.LensLike f s t a b maybe'shape = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'shape") maybe'version :: forall f s t a b . (Lens.Labels.HasLens "maybe'version" f s t a b) => Lens.Family2.LensLike f s t a b maybe'version = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "maybe'version") numShards :: forall f s t a b . (Lens.Labels.HasLens "numShards" f s t a b) => Lens.Family2.LensLike f s t a b numShards = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "numShards") offset :: forall f s t a b . (Lens.Labels.HasLens "offset" f s t a b) => Lens.Family2.LensLike f s t a b offset = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "offset") shape :: forall f s t a b . (Lens.Labels.HasLens "shape" f s t a b) => Lens.Family2.LensLike f s t a b shape = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "shape") shardId :: forall f s t a b . (Lens.Labels.HasLens "shardId" f s t a b) => Lens.Family2.LensLike f s t a b shardId = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "shardId") size :: forall f s t a b . (Lens.Labels.HasLens "size" f s t a b) => Lens.Family2.LensLike f s t a b size = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "size") slices :: forall f s t a b . (Lens.Labels.HasLens "slices" f s t a b) => Lens.Family2.LensLike f s t a b slices = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "slices") version :: forall f s t a b . (Lens.Labels.HasLens "version" f s t a b) => Lens.Family2.LensLike f s t a b version = Lens.Labels.lensOf ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "version")