{- This file was auto-generated from tensorflow/core/framework/tensor.proto by the proto-lens-protoc program. -}
{-# LANGUAGE ScopedTypeVariables, DataKinds, TypeFamilies,
  MultiParamTypeClasses, FlexibleContexts, FlexibleInstances,
  PatternSynonyms #-}
{-# OPTIONS_GHC -fno-warn-unused-imports#-}
module Proto.Tensorflow.Core.Framework.Tensor where
import qualified Prelude
import qualified Data.Int
import qualified 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 Proto.Tensorflow.Core.Framework.ResourceHandle
import qualified Proto.Tensorflow.Core.Framework.TensorShape
import qualified Proto.Tensorflow.Core.Framework.Types

data TensorProto = TensorProto{_TensorProto'dtype ::
                               Proto.Tensorflow.Core.Framework.Types.DataType,
                               _TensorProto'tensorShape ::
                               Prelude.Maybe
                                 Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto,
                               _TensorProto'versionNumber :: Data.Int.Int32,
                               _TensorProto'tensorContent :: Data.ByteString.ByteString,
                               _TensorProto'halfVal :: [Data.Int.Int32],
                               _TensorProto'floatVal :: [Prelude.Float],
                               _TensorProto'doubleVal :: [Prelude.Double],
                               _TensorProto'intVal :: [Data.Int.Int32],
                               _TensorProto'stringVal :: [Data.ByteString.ByteString],
                               _TensorProto'scomplexVal :: [Prelude.Float],
                               _TensorProto'int64Val :: [Data.Int.Int64],
                               _TensorProto'boolVal :: [Prelude.Bool],
                               _TensorProto'dcomplexVal :: [Prelude.Double],
                               _TensorProto'resourceHandleVal ::
                               [Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandle]}
                 deriving (Prelude.Show, Prelude.Eq)

type instance Data.ProtoLens.Field "dtype" TensorProto =
     Proto.Tensorflow.Core.Framework.Types.DataType

instance Data.ProtoLens.HasField "dtype" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'dtype
              (\ x__ y__ -> x__{_TensorProto'dtype = y__})

type instance Data.ProtoLens.Field "tensorShape" TensorProto =
     Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto

instance Data.ProtoLens.HasField "tensorShape" TensorProto
         TensorProto where
        field _
          = (Prelude..) maybe'tensorShape
              (Data.ProtoLens.maybeLens Data.Default.Class.def)

type instance Data.ProtoLens.Field "maybe'tensorShape" TensorProto
     =
     Prelude.Maybe
       Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto

instance Data.ProtoLens.HasField "maybe'tensorShape" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'tensorShape
              (\ x__ y__ -> x__{_TensorProto'tensorShape = y__})

type instance Data.ProtoLens.Field "versionNumber" TensorProto =
     Data.Int.Int32

instance Data.ProtoLens.HasField "versionNumber" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'versionNumber
              (\ x__ y__ -> x__{_TensorProto'versionNumber = y__})

type instance Data.ProtoLens.Field "tensorContent" TensorProto =
     Data.ByteString.ByteString

instance Data.ProtoLens.HasField "tensorContent" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'tensorContent
              (\ x__ y__ -> x__{_TensorProto'tensorContent = y__})

type instance Data.ProtoLens.Field "halfVal" TensorProto =
     [Data.Int.Int32]

instance Data.ProtoLens.HasField "halfVal" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'halfVal
              (\ x__ y__ -> x__{_TensorProto'halfVal = y__})

type instance Data.ProtoLens.Field "floatVal" TensorProto =
     [Prelude.Float]

instance Data.ProtoLens.HasField "floatVal" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'floatVal
              (\ x__ y__ -> x__{_TensorProto'floatVal = y__})

type instance Data.ProtoLens.Field "doubleVal" TensorProto =
     [Prelude.Double]

instance Data.ProtoLens.HasField "doubleVal" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'doubleVal
              (\ x__ y__ -> x__{_TensorProto'doubleVal = y__})

type instance Data.ProtoLens.Field "intVal" TensorProto =
     [Data.Int.Int32]

instance Data.ProtoLens.HasField "intVal" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'intVal
              (\ x__ y__ -> x__{_TensorProto'intVal = y__})

type instance Data.ProtoLens.Field "stringVal" TensorProto =
     [Data.ByteString.ByteString]

instance Data.ProtoLens.HasField "stringVal" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'stringVal
              (\ x__ y__ -> x__{_TensorProto'stringVal = y__})

type instance Data.ProtoLens.Field "scomplexVal" TensorProto =
     [Prelude.Float]

instance Data.ProtoLens.HasField "scomplexVal" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'scomplexVal
              (\ x__ y__ -> x__{_TensorProto'scomplexVal = y__})

type instance Data.ProtoLens.Field "int64Val" TensorProto =
     [Data.Int.Int64]

instance Data.ProtoLens.HasField "int64Val" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'int64Val
              (\ x__ y__ -> x__{_TensorProto'int64Val = y__})

type instance Data.ProtoLens.Field "boolVal" TensorProto =
     [Prelude.Bool]

instance Data.ProtoLens.HasField "boolVal" TensorProto TensorProto
         where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'boolVal
              (\ x__ y__ -> x__{_TensorProto'boolVal = y__})

type instance Data.ProtoLens.Field "dcomplexVal" TensorProto =
     [Prelude.Double]

instance Data.ProtoLens.HasField "dcomplexVal" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'dcomplexVal
              (\ x__ y__ -> x__{_TensorProto'dcomplexVal = y__})

type instance Data.ProtoLens.Field "resourceHandleVal" TensorProto
     = [Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandle]

instance Data.ProtoLens.HasField "resourceHandleVal" TensorProto
         TensorProto where
        field _
          = Lens.Family2.Unchecked.lens _TensorProto'resourceHandleVal
              (\ x__ y__ -> x__{_TensorProto'resourceHandleVal = y__})

instance Data.Default.Class.Default TensorProto where
        def
          = TensorProto{_TensorProto'dtype = Data.Default.Class.def,
                        _TensorProto'tensorShape = Prelude.Nothing,
                        _TensorProto'versionNumber = Data.ProtoLens.fieldDefault,
                        _TensorProto'tensorContent = Data.ProtoLens.fieldDefault,
                        _TensorProto'halfVal = [], _TensorProto'floatVal = [],
                        _TensorProto'doubleVal = [], _TensorProto'intVal = [],
                        _TensorProto'stringVal = [], _TensorProto'scomplexVal = [],
                        _TensorProto'int64Val = [], _TensorProto'boolVal = [],
                        _TensorProto'dcomplexVal = [], _TensorProto'resourceHandleVal = []}

instance Data.ProtoLens.Message TensorProto 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)
                tensorShape__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "tensor_shape"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor
                           Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)
                      (Data.ProtoLens.OptionalField maybe'tensorShape)
                versionNumber__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "version_number"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional versionNumber)
                tensorContent__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "tensor_content"
                      (Data.ProtoLens.BytesField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional tensorContent)
                halfVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "half_val"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed halfVal)
                floatVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "float_val"
                      (Data.ProtoLens.FloatField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed floatVal)
                doubleVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "double_val"
                      (Data.ProtoLens.DoubleField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed doubleVal)
                intVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "int_val"
                      (Data.ProtoLens.Int32Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int32)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed intVal)
                stringVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "string_val"
                      (Data.ProtoLens.BytesField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.ByteString.ByteString)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked stringVal)
                scomplexVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "scomplex_val"
                      (Data.ProtoLens.FloatField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Float)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed scomplexVal)
                int64Val__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "int64_val"
                      (Data.ProtoLens.Int64Field ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Int.Int64)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed int64Val)
                boolVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "bool_val"
                      (Data.ProtoLens.BoolField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed boolVal)
                dcomplexVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "dcomplex_val"
                      (Data.ProtoLens.DoubleField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Double)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Packed dcomplexVal)
                resourceHandleVal__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "resource_handle_val"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor
                           Proto.Tensorflow.Core.Framework.ResourceHandle.ResourceHandle)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked
                         resourceHandleVal)
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, dtype__field_descriptor),
                    (Data.ProtoLens.Tag 2, tensorShape__field_descriptor),
                    (Data.ProtoLens.Tag 3, versionNumber__field_descriptor),
                    (Data.ProtoLens.Tag 4, tensorContent__field_descriptor),
                    (Data.ProtoLens.Tag 13, halfVal__field_descriptor),
                    (Data.ProtoLens.Tag 5, floatVal__field_descriptor),
                    (Data.ProtoLens.Tag 6, doubleVal__field_descriptor),
                    (Data.ProtoLens.Tag 7, intVal__field_descriptor),
                    (Data.ProtoLens.Tag 8, stringVal__field_descriptor),
                    (Data.ProtoLens.Tag 9, scomplexVal__field_descriptor),
                    (Data.ProtoLens.Tag 10, int64Val__field_descriptor),
                    (Data.ProtoLens.Tag 11, boolVal__field_descriptor),
                    (Data.ProtoLens.Tag 12, dcomplexVal__field_descriptor),
                    (Data.ProtoLens.Tag 14, resourceHandleVal__field_descriptor)])
                (Data.Map.fromList
                   [("dtype", dtype__field_descriptor),
                    ("tensor_shape", tensorShape__field_descriptor),
                    ("version_number", versionNumber__field_descriptor),
                    ("tensor_content", tensorContent__field_descriptor),
                    ("half_val", halfVal__field_descriptor),
                    ("float_val", floatVal__field_descriptor),
                    ("double_val", doubleVal__field_descriptor),
                    ("int_val", intVal__field_descriptor),
                    ("string_val", stringVal__field_descriptor),
                    ("scomplex_val", scomplexVal__field_descriptor),
                    ("int64_val", int64Val__field_descriptor),
                    ("bool_val", boolVal__field_descriptor),
                    ("dcomplex_val", dcomplexVal__field_descriptor),
                    ("resource_handle_val", resourceHandleVal__field_descriptor)])

boolVal ::
        forall msg msg' . Data.ProtoLens.HasField "boolVal" msg msg' =>
          Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "boolVal" msg)
            (Data.ProtoLens.Field "boolVal" msg')
boolVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "boolVal")

dcomplexVal ::
            forall msg msg' . Data.ProtoLens.HasField "dcomplexVal" msg msg' =>
              Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "dcomplexVal" msg)
                (Data.ProtoLens.Field "dcomplexVal" msg')
dcomplexVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "dcomplexVal")

doubleVal ::
          forall msg msg' . Data.ProtoLens.HasField "doubleVal" msg msg' =>
            Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "doubleVal" msg)
              (Data.ProtoLens.Field "doubleVal" msg')
doubleVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "doubleVal")

dtype ::
      forall msg msg' . Data.ProtoLens.HasField "dtype" msg msg' =>
        Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "dtype" msg)
          (Data.ProtoLens.Field "dtype" msg')
dtype
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "dtype")

floatVal ::
         forall msg msg' . Data.ProtoLens.HasField "floatVal" msg msg' =>
           Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "floatVal" msg)
             (Data.ProtoLens.Field "floatVal" msg')
floatVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "floatVal")

halfVal ::
        forall msg msg' . Data.ProtoLens.HasField "halfVal" msg msg' =>
          Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "halfVal" msg)
            (Data.ProtoLens.Field "halfVal" msg')
halfVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "halfVal")

int64Val ::
         forall msg msg' . Data.ProtoLens.HasField "int64Val" msg msg' =>
           Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "int64Val" msg)
             (Data.ProtoLens.Field "int64Val" msg')
int64Val
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "int64Val")

intVal ::
       forall msg msg' . Data.ProtoLens.HasField "intVal" msg msg' =>
         Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "intVal" msg)
           (Data.ProtoLens.Field "intVal" msg')
intVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "intVal")

maybe'tensorShape ::
                  forall msg msg' .
                    Data.ProtoLens.HasField "maybe'tensorShape" msg msg' =>
                    Lens.Family2.Lens msg msg'
                      (Data.ProtoLens.Field "maybe'tensorShape" msg)
                      (Data.ProtoLens.Field "maybe'tensorShape" msg')
maybe'tensorShape
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym ::
         Data.ProtoLens.ProxySym "maybe'tensorShape")

resourceHandleVal ::
                  forall msg msg' .
                    Data.ProtoLens.HasField "resourceHandleVal" msg msg' =>
                    Lens.Family2.Lens msg msg'
                      (Data.ProtoLens.Field "resourceHandleVal" msg)
                      (Data.ProtoLens.Field "resourceHandleVal" msg')
resourceHandleVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym ::
         Data.ProtoLens.ProxySym "resourceHandleVal")

scomplexVal ::
            forall msg msg' . Data.ProtoLens.HasField "scomplexVal" msg msg' =>
              Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "scomplexVal" msg)
                (Data.ProtoLens.Field "scomplexVal" msg')
scomplexVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "scomplexVal")

stringVal ::
          forall msg msg' . Data.ProtoLens.HasField "stringVal" msg msg' =>
            Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "stringVal" msg)
              (Data.ProtoLens.Field "stringVal" msg')
stringVal
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "stringVal")

tensorContent ::
              forall msg msg' .
                Data.ProtoLens.HasField "tensorContent" msg msg' =>
                Lens.Family2.Lens msg msg'
                  (Data.ProtoLens.Field "tensorContent" msg)
                  (Data.ProtoLens.Field "tensorContent" msg')
tensorContent
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym ::
         Data.ProtoLens.ProxySym "tensorContent")

tensorShape ::
            forall msg msg' . Data.ProtoLens.HasField "tensorShape" msg msg' =>
              Lens.Family2.Lens msg msg' (Data.ProtoLens.Field "tensorShape" msg)
                (Data.ProtoLens.Field "tensorShape" msg')
tensorShape
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym :: Data.ProtoLens.ProxySym "tensorShape")

versionNumber ::
              forall msg msg' .
                Data.ProtoLens.HasField "versionNumber" msg msg' =>
                Lens.Family2.Lens msg msg'
                  (Data.ProtoLens.Field "versionNumber" msg)
                  (Data.ProtoLens.Field "versionNumber" msg')
versionNumber
  = Data.ProtoLens.field
      (Data.ProtoLens.ProxySym ::
         Data.ProtoLens.ProxySym "versionNumber")