{- This file was auto-generated from tensorflow/core/framework/tensor_shape.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.Framework.TensorShape 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

data TensorShapeProto = TensorShapeProto{_TensorShapeProto'dim ::
                                         ![TensorShapeProto'Dim],
                                         _TensorShapeProto'unknownRank :: !Prelude.Bool}
                      deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)

instance (a ~ [TensorShapeProto'Dim], b ~ [TensorShapeProto'Dim],
          Prelude.Functor f) =>
         Lens.Labels.HasLens "dim" f TensorShapeProto TensorShapeProto a b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _TensorShapeProto'dim
                 (\ x__ y__ -> x__{_TensorShapeProto'dim = y__}))
              Prelude.id

instance (a ~ Prelude.Bool, b ~ Prelude.Bool, Prelude.Functor f) =>
         Lens.Labels.HasLens "unknownRank" f TensorShapeProto
           TensorShapeProto
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _TensorShapeProto'unknownRank
                 (\ x__ y__ -> x__{_TensorShapeProto'unknownRank = y__}))
              Prelude.id

instance Data.Default.Class.Default TensorShapeProto where
        def
          = TensorShapeProto{_TensorShapeProto'dim = [],
                             _TensorShapeProto'unknownRank = Data.ProtoLens.fieldDefault}

instance Data.ProtoLens.Message TensorShapeProto where
        descriptor
          = let dim__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "dim"
                      (Data.ProtoLens.MessageField ::
                         Data.ProtoLens.FieldTypeDescriptor TensorShapeProto'Dim)
                      (Data.ProtoLens.RepeatedField Data.ProtoLens.Unpacked dim)
                      :: Data.ProtoLens.FieldDescriptor TensorShapeProto
                unknownRank__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "unknown_rank"
                      (Data.ProtoLens.BoolField ::
                         Data.ProtoLens.FieldTypeDescriptor Prelude.Bool)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional unknownRank)
                      :: Data.ProtoLens.FieldDescriptor TensorShapeProto
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Text.pack "tensorflow.TensorShapeProto")
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 2, dim__field_descriptor),
                    (Data.ProtoLens.Tag 3, unknownRank__field_descriptor)])
                (Data.Map.fromList
                   [("dim", dim__field_descriptor),
                    ("unknown_rank", unknownRank__field_descriptor)])

data TensorShapeProto'Dim = TensorShapeProto'Dim{_TensorShapeProto'Dim'size
                                                 :: !Data.Int.Int64,
                                                 _TensorShapeProto'Dim'name :: !Data.Text.Text}
                          deriving (Prelude.Show, Prelude.Eq, Prelude.Ord)

instance (a ~ Data.Int.Int64, b ~ Data.Int.Int64,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "size" f TensorShapeProto'Dim
           TensorShapeProto'Dim
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _TensorShapeProto'Dim'size
                 (\ x__ y__ -> x__{_TensorShapeProto'Dim'size = y__}))
              Prelude.id

instance (a ~ Data.Text.Text, b ~ Data.Text.Text,
          Prelude.Functor f) =>
         Lens.Labels.HasLens "name" f TensorShapeProto'Dim
           TensorShapeProto'Dim
           a
           b
         where
        lensOf _
          = (Prelude..)
              (Lens.Family2.Unchecked.lens _TensorShapeProto'Dim'name
                 (\ x__ y__ -> x__{_TensorShapeProto'Dim'name = y__}))
              Prelude.id

instance Data.Default.Class.Default TensorShapeProto'Dim where
        def
          = TensorShapeProto'Dim{_TensorShapeProto'Dim'size =
                                   Data.ProtoLens.fieldDefault,
                                 _TensorShapeProto'Dim'name = Data.ProtoLens.fieldDefault}

instance Data.ProtoLens.Message TensorShapeProto'Dim where
        descriptor
          = let 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 TensorShapeProto'Dim
                name__field_descriptor
                  = Data.ProtoLens.FieldDescriptor "name"
                      (Data.ProtoLens.StringField ::
                         Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
                      (Data.ProtoLens.PlainField Data.ProtoLens.Optional name)
                      :: Data.ProtoLens.FieldDescriptor TensorShapeProto'Dim
              in
              Data.ProtoLens.MessageDescriptor
                (Data.Text.pack "tensorflow.TensorShapeProto.Dim")
                (Data.Map.fromList
                   [(Data.ProtoLens.Tag 1, size__field_descriptor),
                    (Data.ProtoLens.Tag 2, name__field_descriptor)])
                (Data.Map.fromList
                   [("size", size__field_descriptor),
                    ("name", name__field_descriptor)])

dim ::
    forall f s t a b . (Lens.Labels.HasLens "dim" f s t a b) =>
      Lens.Family2.LensLike f s t a b
dim
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "dim")

name ::
     forall f s t a b . (Lens.Labels.HasLens "name" f s t a b) =>
       Lens.Family2.LensLike f s t a b
name
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "name")

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")

unknownRank ::
            forall f s t a b . (Lens.Labels.HasLens "unknownRank" f s t a b) =>
              Lens.Family2.LensLike f s t a b
unknownRank
  = Lens.Labels.lensOf
      ((Lens.Labels.proxy#) :: (Lens.Labels.Proxy#) "unknownRank")