{- This file was auto-generated from tensorflow/core/framework/resource_handle.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.ResourceHandle (
        ResourceHandleProto(), ResourceHandleProto'DtypeAndShape()
    ) 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
import qualified Proto.Tensorflow.Core.Framework.TensorShape
import qualified Proto.Tensorflow.Core.Framework.Types
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.device' @:: Lens' ResourceHandleProto Data.Text.Text@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.container' @:: Lens' ResourceHandleProto Data.Text.Text@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.name' @:: Lens' ResourceHandleProto Data.Text.Text@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.hashCode' @:: Lens' ResourceHandleProto Data.Word.Word64@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.maybeTypeName' @:: Lens' ResourceHandleProto Data.Text.Text@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.dtypesAndShapes' @:: Lens' ResourceHandleProto [ResourceHandleProto'DtypeAndShape]@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.vec'dtypesAndShapes' @:: Lens' ResourceHandleProto (Data.Vector.Vector ResourceHandleProto'DtypeAndShape)@ -}
data ResourceHandleProto
  = ResourceHandleProto'_constructor {ResourceHandleProto -> Text
_ResourceHandleProto'device :: !Data.Text.Text,
                                      ResourceHandleProto -> Text
_ResourceHandleProto'container :: !Data.Text.Text,
                                      ResourceHandleProto -> Text
_ResourceHandleProto'name :: !Data.Text.Text,
                                      ResourceHandleProto -> Word64
_ResourceHandleProto'hashCode :: !Data.Word.Word64,
                                      ResourceHandleProto -> Text
_ResourceHandleProto'maybeTypeName :: !Data.Text.Text,
                                      ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes :: !(Data.Vector.Vector ResourceHandleProto'DtypeAndShape),
                                      ResourceHandleProto -> FieldSet
_ResourceHandleProto'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (ResourceHandleProto -> ResourceHandleProto -> Bool
(ResourceHandleProto -> ResourceHandleProto -> Bool)
-> (ResourceHandleProto -> ResourceHandleProto -> Bool)
-> Eq ResourceHandleProto
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c/= :: ResourceHandleProto -> ResourceHandleProto -> Bool
== :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c== :: ResourceHandleProto -> ResourceHandleProto -> Bool
Prelude.Eq, Eq ResourceHandleProto
Eq ResourceHandleProto =>
(ResourceHandleProto -> ResourceHandleProto -> Ordering)
-> (ResourceHandleProto -> ResourceHandleProto -> Bool)
-> (ResourceHandleProto -> ResourceHandleProto -> Bool)
-> (ResourceHandleProto -> ResourceHandleProto -> Bool)
-> (ResourceHandleProto -> ResourceHandleProto -> Bool)
-> (ResourceHandleProto
    -> ResourceHandleProto -> ResourceHandleProto)
-> (ResourceHandleProto
    -> ResourceHandleProto -> ResourceHandleProto)
-> Ord ResourceHandleProto
ResourceHandleProto -> ResourceHandleProto -> Bool
ResourceHandleProto -> ResourceHandleProto -> Ordering
ResourceHandleProto -> ResourceHandleProto -> ResourceHandleProto
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 :: ResourceHandleProto -> ResourceHandleProto -> ResourceHandleProto
$cmin :: ResourceHandleProto -> ResourceHandleProto -> ResourceHandleProto
max :: ResourceHandleProto -> ResourceHandleProto -> ResourceHandleProto
$cmax :: ResourceHandleProto -> ResourceHandleProto -> ResourceHandleProto
>= :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c>= :: ResourceHandleProto -> ResourceHandleProto -> Bool
> :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c> :: ResourceHandleProto -> ResourceHandleProto -> Bool
<= :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c<= :: ResourceHandleProto -> ResourceHandleProto -> Bool
< :: ResourceHandleProto -> ResourceHandleProto -> Bool
$c< :: ResourceHandleProto -> ResourceHandleProto -> Bool
compare :: ResourceHandleProto -> ResourceHandleProto -> Ordering
$ccompare :: ResourceHandleProto -> ResourceHandleProto -> Ordering
$cp1Ord :: Eq ResourceHandleProto
Prelude.Ord)
instance Prelude.Show ResourceHandleProto where
  showsPrec :: Int -> ResourceHandleProto -> ShowS
showsPrec _ __x :: ResourceHandleProto
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (ResourceHandleProto -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResourceHandleProto
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResourceHandleProto "device" Data.Text.Text where
  fieldOf :: Proxy# "device"
-> (Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto
fieldOf _
    = ((Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Text)
-> (ResourceHandleProto -> Text -> ResourceHandleProto)
-> Lens ResourceHandleProto ResourceHandleProto Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Text
_ResourceHandleProto'device
           (\ x__ :: ResourceHandleProto
x__ y__ :: Text
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'device :: Text
_ResourceHandleProto'device = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto "container" Data.Text.Text where
  fieldOf :: Proxy# "container"
-> (Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto
fieldOf _
    = ((Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Text)
-> (ResourceHandleProto -> Text -> ResourceHandleProto)
-> Lens ResourceHandleProto ResourceHandleProto Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Text
_ResourceHandleProto'container
           (\ x__ :: ResourceHandleProto
x__ y__ :: Text
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'container :: Text
_ResourceHandleProto'container = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto "name" Data.Text.Text where
  fieldOf :: Proxy# "name"
-> (Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto
fieldOf _
    = ((Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Text)
-> (ResourceHandleProto -> Text -> ResourceHandleProto)
-> Lens ResourceHandleProto ResourceHandleProto Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Text
_ResourceHandleProto'name
           (\ x__ :: ResourceHandleProto
x__ y__ :: Text
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'name :: Text
_ResourceHandleProto'name = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto "hashCode" Data.Word.Word64 where
  fieldOf :: Proxy# "hashCode"
-> (Word64 -> f Word64)
-> ResourceHandleProto
-> f ResourceHandleProto
fieldOf _
    = ((Word64 -> f Word64)
 -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Word64 -> f Word64) -> Word64 -> f Word64)
-> (Word64 -> f Word64)
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Word64)
-> (ResourceHandleProto -> Word64 -> ResourceHandleProto)
-> Lens ResourceHandleProto ResourceHandleProto Word64 Word64
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Word64
_ResourceHandleProto'hashCode
           (\ x__ :: ResourceHandleProto
x__ y__ :: Word64
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'hashCode :: Word64
_ResourceHandleProto'hashCode = Word64
y__}))
        (Word64 -> f Word64) -> Word64 -> f Word64
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto "maybeTypeName" Data.Text.Text where
  fieldOf :: Proxy# "maybeTypeName"
-> (Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto
fieldOf _
    = ((Text -> f Text) -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Text -> f Text) -> Text -> f Text)
-> (Text -> f Text)
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Text)
-> (ResourceHandleProto -> Text -> ResourceHandleProto)
-> Lens ResourceHandleProto ResourceHandleProto Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Text
_ResourceHandleProto'maybeTypeName
           (\ x__ :: ResourceHandleProto
x__ y__ :: Text
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'maybeTypeName :: Text
_ResourceHandleProto'maybeTypeName = Text
y__}))
        (Text -> f Text) -> Text -> f Text
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto "dtypesAndShapes" [ResourceHandleProto'DtypeAndShape] where
  fieldOf :: Proxy# "dtypesAndShapes"
-> ([ResourceHandleProto'DtypeAndShape]
    -> f [ResourceHandleProto'DtypeAndShape])
-> ResourceHandleProto
-> f ResourceHandleProto
fieldOf _
    = ((Vector ResourceHandleProto'DtypeAndShape
  -> f (Vector ResourceHandleProto'DtypeAndShape))
 -> ResourceHandleProto -> f ResourceHandleProto)
-> (([ResourceHandleProto'DtypeAndShape]
     -> f [ResourceHandleProto'DtypeAndShape])
    -> Vector ResourceHandleProto'DtypeAndShape
    -> f (Vector ResourceHandleProto'DtypeAndShape))
-> ([ResourceHandleProto'DtypeAndShape]
    -> f [ResourceHandleProto'DtypeAndShape])
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape)
-> (ResourceHandleProto
    -> Vector ResourceHandleProto'DtypeAndShape -> ResourceHandleProto)
-> Lens
     ResourceHandleProto
     ResourceHandleProto
     (Vector ResourceHandleProto'DtypeAndShape)
     (Vector ResourceHandleProto'DtypeAndShape)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes
           (\ x__ :: ResourceHandleProto
x__ y__ :: Vector ResourceHandleProto'DtypeAndShape
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'dtypesAndShapes :: Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes = Vector ResourceHandleProto'DtypeAndShape
y__}))
        ((Vector ResourceHandleProto'DtypeAndShape
 -> [ResourceHandleProto'DtypeAndShape])
-> (Vector ResourceHandleProto'DtypeAndShape
    -> [ResourceHandleProto'DtypeAndShape]
    -> Vector ResourceHandleProto'DtypeAndShape)
-> Lens
     (Vector ResourceHandleProto'DtypeAndShape)
     (Vector ResourceHandleProto'DtypeAndShape)
     [ResourceHandleProto'DtypeAndShape]
     [ResourceHandleProto'DtypeAndShape]
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           Vector ResourceHandleProto'DtypeAndShape
-> [ResourceHandleProto'DtypeAndShape]
forall (v :: * -> *) a. Vector v a => v a -> [a]
Data.Vector.Generic.toList
           (\ _ y__ :: [ResourceHandleProto'DtypeAndShape]
y__ -> [ResourceHandleProto'DtypeAndShape]
-> Vector ResourceHandleProto'DtypeAndShape
forall (v :: * -> *) a. Vector v a => [a] -> v a
Data.Vector.Generic.fromList [ResourceHandleProto'DtypeAndShape]
y__))
instance Data.ProtoLens.Field.HasField ResourceHandleProto "vec'dtypesAndShapes" (Data.Vector.Vector ResourceHandleProto'DtypeAndShape) where
  fieldOf :: Proxy# "vec'dtypesAndShapes"
-> (Vector ResourceHandleProto'DtypeAndShape
    -> f (Vector ResourceHandleProto'DtypeAndShape))
-> ResourceHandleProto
-> f ResourceHandleProto
fieldOf _
    = ((Vector ResourceHandleProto'DtypeAndShape
  -> f (Vector ResourceHandleProto'DtypeAndShape))
 -> ResourceHandleProto -> f ResourceHandleProto)
-> ((Vector ResourceHandleProto'DtypeAndShape
     -> f (Vector ResourceHandleProto'DtypeAndShape))
    -> Vector ResourceHandleProto'DtypeAndShape
    -> f (Vector ResourceHandleProto'DtypeAndShape))
-> (Vector ResourceHandleProto'DtypeAndShape
    -> f (Vector ResourceHandleProto'DtypeAndShape))
-> ResourceHandleProto
-> f ResourceHandleProto
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape)
-> (ResourceHandleProto
    -> Vector ResourceHandleProto'DtypeAndShape -> ResourceHandleProto)
-> Lens
     ResourceHandleProto
     ResourceHandleProto
     (Vector ResourceHandleProto'DtypeAndShape)
     (Vector ResourceHandleProto'DtypeAndShape)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes
           (\ x__ :: ResourceHandleProto
x__ y__ :: Vector ResourceHandleProto'DtypeAndShape
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'dtypesAndShapes :: Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes = Vector ResourceHandleProto'DtypeAndShape
y__}))
        (Vector ResourceHandleProto'DtypeAndShape
 -> f (Vector ResourceHandleProto'DtypeAndShape))
-> Vector ResourceHandleProto'DtypeAndShape
-> f (Vector ResourceHandleProto'DtypeAndShape)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResourceHandleProto where
  messageName :: Proxy ResourceHandleProto -> Text
messageName _ = String -> Text
Data.Text.pack "tensorflow.ResourceHandleProto"
  packedMessageDescriptor :: Proxy ResourceHandleProto -> ByteString
packedMessageDescriptor _
    = "\n\
      \\DC3ResourceHandleProto\DC2\SYN\n\
      \\ACKdevice\CAN\SOH \SOH(\tR\ACKdevice\DC2\FS\n\
      \\tcontainer\CAN\STX \SOH(\tR\tcontainer\DC2\DC2\n\
      \\EOTname\CAN\ETX \SOH(\tR\EOTname\DC2\ESC\n\
      \\thash_code\CAN\EOT \SOH(\EOTR\bhashCode\DC2&\n\
      \\SImaybe_type_name\CAN\ENQ \SOH(\tR\rmaybeTypeName\DC2Y\n\
      \\DC1dtypes_and_shapes\CAN\ACK \ETX(\v2-.tensorflow.ResourceHandleProto.DtypeAndShapeR\SIdtypesAndShapes\SUBo\n\
      \\rDtypeAndShape\DC2*\n\
      \\ENQdtype\CAN\SOH \SOH(\SO2\DC4.tensorflow.DataTypeR\ENQdtype\DC22\n\
      \\ENQshape\CAN\STX \SOH(\v2\FS.tensorflow.TensorShapeProtoR\ENQshapeJ\EOT\b\a\DLE\b"
  packedFileDescriptor :: Proxy ResourceHandleProto -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ResourceHandleProto)
fieldsByTag
    = let
        device__field_descriptor :: FieldDescriptor ResourceHandleProto
device__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor ResourceHandleProto Text
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "device"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens ResourceHandleProto ResourceHandleProto Text Text
-> FieldAccessor ResourceHandleProto Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "device" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"device")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
        container__field_descriptor :: FieldDescriptor ResourceHandleProto
container__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor ResourceHandleProto Text
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "container"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens ResourceHandleProto ResourceHandleProto Text Text
-> FieldAccessor ResourceHandleProto Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "container" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"container")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
        name__field_descriptor :: FieldDescriptor ResourceHandleProto
name__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor ResourceHandleProto Text
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "name"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens ResourceHandleProto ResourceHandleProto Text Text
-> FieldAccessor ResourceHandleProto Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
        hashCode__field_descriptor :: FieldDescriptor ResourceHandleProto
hashCode__field_descriptor
          = String
-> FieldTypeDescriptor Word64
-> FieldAccessor ResourceHandleProto Word64
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "hash_code"
              (ScalarField Word64 -> FieldTypeDescriptor Word64
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Word64
Data.ProtoLens.UInt64Field ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Word.Word64)
              (WireDefault Word64
-> Lens ResourceHandleProto ResourceHandleProto Word64 Word64
-> FieldAccessor ResourceHandleProto Word64
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Word64
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "hashCode" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hashCode")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
        maybeTypeName__field_descriptor :: FieldDescriptor ResourceHandleProto
maybeTypeName__field_descriptor
          = String
-> FieldTypeDescriptor Text
-> FieldAccessor ResourceHandleProto Text
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "maybe_type_name"
              (ScalarField Text -> FieldTypeDescriptor Text
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField Text
Data.ProtoLens.StringField ::
                 Data.ProtoLens.FieldTypeDescriptor Data.Text.Text)
              (WireDefault Text
-> Lens ResourceHandleProto ResourceHandleProto Text Text
-> FieldAccessor ResourceHandleProto Text
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault Text
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional
                 (forall s a (f :: * -> *).
(HasField s "maybeTypeName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybeTypeName")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
        dtypesAndShapes__field_descriptor :: FieldDescriptor ResourceHandleProto
dtypesAndShapes__field_descriptor
          = String
-> FieldTypeDescriptor ResourceHandleProto'DtypeAndShape
-> FieldAccessor
     ResourceHandleProto ResourceHandleProto'DtypeAndShape
-> FieldDescriptor ResourceHandleProto
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "dtypes_and_shapes"
              (MessageOrGroup
-> FieldTypeDescriptor ResourceHandleProto'DtypeAndShape
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor ResourceHandleProto'DtypeAndShape)
              (Packing
-> Lens' ResourceHandleProto [ResourceHandleProto'DtypeAndShape]
-> FieldAccessor
     ResourceHandleProto ResourceHandleProto'DtypeAndShape
forall msg value.
Packing -> Lens' msg [value] -> FieldAccessor msg value
Data.ProtoLens.RepeatedField
                 Packing
Data.ProtoLens.Unpacked
                 (forall s a (f :: * -> *).
(HasField s "dtypesAndShapes" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"dtypesAndShapes")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto
      in
        [(Tag, FieldDescriptor ResourceHandleProto)]
-> Map Tag (FieldDescriptor ResourceHandleProto)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResourceHandleProto
device__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResourceHandleProto
container__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 3, FieldDescriptor ResourceHandleProto
name__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 4, FieldDescriptor ResourceHandleProto
hashCode__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 5, FieldDescriptor ResourceHandleProto
maybeTypeName__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 6, FieldDescriptor ResourceHandleProto
dtypesAndShapes__field_descriptor)]
  unknownFields :: LensLike' f ResourceHandleProto FieldSet
unknownFields
    = (ResourceHandleProto -> FieldSet)
-> (ResourceHandleProto -> FieldSet -> ResourceHandleProto)
-> Lens' ResourceHandleProto FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ResourceHandleProto -> FieldSet
_ResourceHandleProto'_unknownFields
        (\ x__ :: ResourceHandleProto
x__ y__ :: FieldSet
y__ -> ResourceHandleProto
x__ {_ResourceHandleProto'_unknownFields :: FieldSet
_ResourceHandleProto'_unknownFields = FieldSet
y__})
  defMessage :: ResourceHandleProto
defMessage
    = $WResourceHandleProto'_constructor :: Text
-> Text
-> Text
-> Word64
-> Text
-> Vector ResourceHandleProto'DtypeAndShape
-> FieldSet
-> ResourceHandleProto
ResourceHandleProto'_constructor
        {_ResourceHandleProto'device :: Text
_ResourceHandleProto'device = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'container :: Text
_ResourceHandleProto'container = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'name :: Text
_ResourceHandleProto'name = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'hashCode :: Word64
_ResourceHandleProto'hashCode = Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'maybeTypeName :: Text
_ResourceHandleProto'maybeTypeName = Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'dtypesAndShapes :: Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes = Vector ResourceHandleProto'DtypeAndShape
forall (v :: * -> *) a. Vector v a => v a
Data.Vector.Generic.empty,
         _ResourceHandleProto'_unknownFields :: FieldSet
_ResourceHandleProto'_unknownFields = []}
  parseMessage :: Parser ResourceHandleProto
parseMessage
    = let
        loop ::
          ResourceHandleProto
          -> Data.ProtoLens.Encoding.Growing.Growing Data.Vector.Vector Data.ProtoLens.Encoding.Growing.RealWorld ResourceHandleProto'DtypeAndShape
             -> Data.ProtoLens.Encoding.Bytes.Parser ResourceHandleProto
        loop :: ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop x :: ResourceHandleProto
x mutable'dtypesAndShapes :: Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do Vector ResourceHandleProto'DtypeAndShape
frozen'dtypesAndShapes <- IO (Vector ResourceHandleProto'DtypeAndShape)
-> Parser (Vector ResourceHandleProto'DtypeAndShape)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                                  (Growing Vector (PrimState IO) ResourceHandleProto'DtypeAndShape
-> IO (Vector ResourceHandleProto'DtypeAndShape)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> m (v a)
Data.ProtoLens.Encoding.Growing.unsafeFreeze
                                                     Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
Growing Vector (PrimState IO) ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes)
                      (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      ResourceHandleProto -> Parser ResourceHandleProto
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter ResourceHandleProto ResourceHandleProto FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> ResourceHandleProto
-> ResourceHandleProto
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter ResourceHandleProto ResourceHandleProto FieldSet FieldSet
Data.ProtoLens.unknownFields
                           (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t)
                           (Setter
  ResourceHandleProto
  ResourceHandleProto
  (Vector ResourceHandleProto'DtypeAndShape)
  (Vector ResourceHandleProto'DtypeAndShape)
-> Vector ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto
-> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                              (forall s a (f :: * -> *).
(HasField s "vec'dtypesAndShapes" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'dtypesAndShapes")
                              Vector ResourceHandleProto'DtypeAndShape
frozen'dtypesAndShapes
                              ResourceHandleProto
x))
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        10
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "device"
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto Text Text
-> Text -> ResourceHandleProto -> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "device" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"device") Text
y ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
                        18
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "container"
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto Text Text
-> Text -> ResourceHandleProto -> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "container" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"container") Text
y ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
                        26
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "name"
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto Text Text
-> Text -> ResourceHandleProto -> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name") Text
y ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
                        32
                          -> do Word64
y <- Parser Word64 -> String -> Parser Word64
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt "hash_code"
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto Word64 Word64
-> Word64 -> ResourceHandleProto -> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "hashCode" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hashCode") Word64
y ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
                        42
                          -> do Text
y <- Parser Text -> String -> Parser Text
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do ByteString
value <- do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                                       Int -> Parser ByteString
Data.ProtoLens.Encoding.Bytes.getBytes
                                                         (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                           Either String Text -> Parser Text
forall a. Either String a -> Parser a
Data.ProtoLens.Encoding.Bytes.runEither
                                             (case ByteString -> Either UnicodeException Text
Data.Text.Encoding.decodeUtf8' ByteString
value of
                                                (Prelude.Left err :: UnicodeException
err)
                                                  -> String -> Either String Text
forall a b. a -> Either a b
Prelude.Left (UnicodeException -> String
forall a. Show a => a -> String
Prelude.show UnicodeException
err)
                                                (Prelude.Right r :: Text
r) -> Text -> Either String Text
forall a b. b -> Either a b
Prelude.Right Text
r))
                                       "maybe_type_name"
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto Text Text
-> Text -> ResourceHandleProto -> ResourceHandleProto
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set
                                     (forall s a (f :: * -> *).
(HasField s "maybeTypeName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybeTypeName") Text
y ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
                        50
                          -> do !ResourceHandleProto'DtypeAndShape
y <- Parser ResourceHandleProto'DtypeAndShape
-> String -> Parser ResourceHandleProto'DtypeAndShape
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                        (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                            Int
-> Parser ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                              (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len)
                                              Parser ResourceHandleProto'DtypeAndShape
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                        "dtypes_and_shapes"
                                Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
v <- IO (Growing Vector RealWorld ResourceHandleProto'DtypeAndShape)
-> Parser
     (Growing Vector RealWorld ResourceHandleProto'DtypeAndShape)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                       (Growing Vector (PrimState IO) ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> IO
     (Growing Vector (PrimState IO) ResourceHandleProto'DtypeAndShape)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
Growing v (PrimState m) a -> a -> m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.append
                                          Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
Growing Vector (PrimState IO) ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes ResourceHandleProto'DtypeAndShape
y)
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop ResourceHandleProto
x Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
v
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop
                                  (Setter ResourceHandleProto ResourceHandleProto FieldSet FieldSet
-> (FieldSet -> FieldSet)
-> ResourceHandleProto
-> ResourceHandleProto
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter ResourceHandleProto ResourceHandleProto FieldSet FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResourceHandleProto
x)
                                  Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes
      in
        Parser ResourceHandleProto -> String -> Parser ResourceHandleProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes <- IO (Growing Vector RealWorld ResourceHandleProto'DtypeAndShape)
-> Parser
     (Growing Vector RealWorld ResourceHandleProto'DtypeAndShape)
forall a. IO a -> Parser a
Data.ProtoLens.Encoding.Parser.Unsafe.unsafeLiftIO
                                           IO (Growing Vector RealWorld ResourceHandleProto'DtypeAndShape)
forall (m :: * -> *) (v :: * -> *) a.
(PrimMonad m, Vector v a) =>
m (Growing v (PrimState m) a)
Data.ProtoLens.Encoding.Growing.new
              ResourceHandleProto
-> Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto
loop ResourceHandleProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage Growing Vector RealWorld ResourceHandleProto'DtypeAndShape
mutable'dtypesAndShapes)
          "ResourceHandleProto"
  buildMessage :: ResourceHandleProto -> Builder
buildMessage
    = \ _x :: ResourceHandleProto
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: Text
_v = FoldLike Text ResourceHandleProto ResourceHandleProto Text Text
-> ResourceHandleProto -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "device" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"device") ResourceHandleProto
_x
              in
                if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 10)
                      ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         (\ bs :: ByteString
bs
                            -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                 (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                    (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                 (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                         Text -> ByteString
Data.Text.Encoding.encodeUtf8
                         Text
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (let
                   _v :: Text
_v = FoldLike Text ResourceHandleProto ResourceHandleProto Text Text
-> ResourceHandleProto -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "container" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"container") ResourceHandleProto
_x
                 in
                   if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                       Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   else
                       Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                         ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                            (\ bs :: ByteString
bs
                               -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                    (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                       (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                    (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                            Text -> ByteString
Data.Text.Encoding.encodeUtf8
                            Text
_v))
                (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                   (let _v :: Text
_v = FoldLike Text ResourceHandleProto ResourceHandleProto Text Text
-> ResourceHandleProto -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "name" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"name") ResourceHandleProto
_x
                    in
                      if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                          Builder
forall a. Monoid a => a
Data.Monoid.mempty
                      else
                          Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 26)
                            ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                               (\ bs :: ByteString
bs
                                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                          (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                       (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                               Text -> ByteString
Data.Text.Encoding.encodeUtf8
                               Text
_v))
                   (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (let
                         _v :: Word64
_v = FoldLike
  Word64 ResourceHandleProto ResourceHandleProto Word64 Word64
-> ResourceHandleProto -> Word64
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "hashCode" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"hashCode") ResourceHandleProto
_x
                       in
                         if Word64 -> Word64 -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Word64
_v Word64
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                             Builder
forall a. Monoid a => a
Data.Monoid.mempty
                         else
                             Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 32)
                               (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Word64
_v))
                      (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                         (let
                            _v :: Text
_v
                              = FoldLike Text ResourceHandleProto ResourceHandleProto Text Text
-> ResourceHandleProto -> Text
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                                  (forall s a (f :: * -> *).
(HasField s "maybeTypeName" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybeTypeName") ResourceHandleProto
_x
                          in
                            if Text -> Text -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) Text
_v Text
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                                Builder
forall a. Monoid a => a
Data.Monoid.mempty
                            else
                                Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 42)
                                  ((ByteString -> Builder) -> (Text -> ByteString) -> Text -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                     (\ bs :: ByteString
bs
                                        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                             (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                                (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                             (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                                     Text -> ByteString
Data.Text.Encoding.encodeUtf8
                                     Text
_v))
                         (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                            ((ResourceHandleProto'DtypeAndShape -> Builder)
-> Vector ResourceHandleProto'DtypeAndShape -> Builder
forall (v :: * -> *) a.
Vector v a =>
(a -> Builder) -> v a -> Builder
Data.ProtoLens.Encoding.Bytes.foldMapBuilder
                               (\ _v :: ResourceHandleProto'DtypeAndShape
_v
                                  -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                       (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 50)
                                       ((ByteString -> Builder)
-> (ResourceHandleProto'DtypeAndShape -> ByteString)
-> ResourceHandleProto'DtypeAndShape
-> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                                          (\ bs :: ByteString
bs
                                             -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                                  (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                                     (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                                        (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                                  (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                                          ResourceHandleProto'DtypeAndShape -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                                          ResourceHandleProto'DtypeAndShape
_v))
                               (FoldLike
  (Vector ResourceHandleProto'DtypeAndShape)
  ResourceHandleProto
  ResourceHandleProto
  (Vector ResourceHandleProto'DtypeAndShape)
  (Vector ResourceHandleProto'DtypeAndShape)
-> ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view
                                  (forall s a (f :: * -> *).
(HasField s "vec'dtypesAndShapes" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"vec'dtypesAndShapes") ResourceHandleProto
_x))
                            (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                               (FoldLike
  FieldSet ResourceHandleProto ResourceHandleProto FieldSet FieldSet
-> ResourceHandleProto -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet ResourceHandleProto ResourceHandleProto FieldSet FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResourceHandleProto
_x)))))))
instance Control.DeepSeq.NFData ResourceHandleProto where
  rnf :: ResourceHandleProto -> ()
rnf
    = \ x__ :: ResourceHandleProto
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ResourceHandleProto -> FieldSet
_ResourceHandleProto'_unknownFields ResourceHandleProto
x__)
             (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ResourceHandleProto -> Text
_ResourceHandleProto'device ResourceHandleProto
x__)
                (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (ResourceHandleProto -> Text
_ResourceHandleProto'container ResourceHandleProto
x__)
                   (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                      (ResourceHandleProto -> Text
_ResourceHandleProto'name ResourceHandleProto
x__)
                      (Word64 -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                         (ResourceHandleProto -> Word64
_ResourceHandleProto'hashCode ResourceHandleProto
x__)
                         (Text -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                            (ResourceHandleProto -> Text
_ResourceHandleProto'maybeTypeName ResourceHandleProto
x__)
                            (Vector ResourceHandleProto'DtypeAndShape -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                               (ResourceHandleProto -> Vector ResourceHandleProto'DtypeAndShape
_ResourceHandleProto'dtypesAndShapes ResourceHandleProto
x__) ()))))))
{- | Fields :
     
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.dtype' @:: Lens' ResourceHandleProto'DtypeAndShape Proto.Tensorflow.Core.Framework.Types.DataType@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.shape' @:: Lens' ResourceHandleProto'DtypeAndShape Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto@
         * 'Proto.Tensorflow.Core.Framework.ResourceHandle_Fields.maybe'shape' @:: Lens' ResourceHandleProto'DtypeAndShape (Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)@ -}
data ResourceHandleProto'DtypeAndShape
  = ResourceHandleProto'DtypeAndShape'_constructor {ResourceHandleProto'DtypeAndShape -> DataType
_ResourceHandleProto'DtypeAndShape'dtype :: !Proto.Tensorflow.Core.Framework.Types.DataType,
                                                    ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape :: !(Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto),
                                                    ResourceHandleProto'DtypeAndShape -> FieldSet
_ResourceHandleProto'DtypeAndShape'_unknownFields :: !Data.ProtoLens.FieldSet}
  deriving stock (ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
(ResourceHandleProto'DtypeAndShape
 -> ResourceHandleProto'DtypeAndShape -> Bool)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape -> Bool)
-> Eq ResourceHandleProto'DtypeAndShape
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c/= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
== :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c== :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
Prelude.Eq, Eq ResourceHandleProto'DtypeAndShape
Eq ResourceHandleProto'DtypeAndShape =>
(ResourceHandleProto'DtypeAndShape
 -> ResourceHandleProto'DtypeAndShape -> Ordering)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape -> Bool)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape -> Bool)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape -> Bool)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape -> Bool)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape)
-> (ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape
    -> ResourceHandleProto'DtypeAndShape)
-> Ord ResourceHandleProto'DtypeAndShape
ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Ordering
ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
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 :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
$cmin :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
max :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
$cmax :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
>= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c>= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
> :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c> :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
<= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c<= :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
< :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
$c< :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Bool
compare :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Ordering
$ccompare :: ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape -> Ordering
$cp1Ord :: Eq ResourceHandleProto'DtypeAndShape
Prelude.Ord)
instance Prelude.Show ResourceHandleProto'DtypeAndShape where
  showsPrec :: Int -> ResourceHandleProto'DtypeAndShape -> ShowS
showsPrec _ __x :: ResourceHandleProto'DtypeAndShape
__x __s :: String
__s
    = Char -> ShowS
Prelude.showChar
        '{'
        (String -> ShowS
Prelude.showString
           (ResourceHandleProto'DtypeAndShape -> String
forall msg. Message msg => msg -> String
Data.ProtoLens.showMessageShort ResourceHandleProto'DtypeAndShape
__x) (Char -> ShowS
Prelude.showChar '}' String
__s))
instance Data.ProtoLens.Field.HasField ResourceHandleProto'DtypeAndShape "dtype" Proto.Tensorflow.Core.Framework.Types.DataType where
  fieldOf :: Proxy# "dtype"
-> (DataType -> f DataType)
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
fieldOf _
    = ((DataType -> f DataType)
 -> ResourceHandleProto'DtypeAndShape
 -> f ResourceHandleProto'DtypeAndShape)
-> ((DataType -> f DataType) -> DataType -> f DataType)
-> (DataType -> f DataType)
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto'DtypeAndShape -> DataType)
-> (ResourceHandleProto'DtypeAndShape
    -> DataType -> ResourceHandleProto'DtypeAndShape)
-> Lens
     ResourceHandleProto'DtypeAndShape
     ResourceHandleProto'DtypeAndShape
     DataType
     DataType
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto'DtypeAndShape -> DataType
_ResourceHandleProto'DtypeAndShape'dtype
           (\ x__ :: ResourceHandleProto'DtypeAndShape
x__ y__ :: DataType
y__
              -> ResourceHandleProto'DtypeAndShape
x__ {_ResourceHandleProto'DtypeAndShape'dtype :: DataType
_ResourceHandleProto'DtypeAndShape'dtype = DataType
y__}))
        (DataType -> f DataType) -> DataType -> f DataType
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Field.HasField ResourceHandleProto'DtypeAndShape "shape" Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto where
  fieldOf :: Proxy# "shape"
-> (TensorShapeProto -> f TensorShapeProto)
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
fieldOf _
    = ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
 -> ResourceHandleProto'DtypeAndShape
 -> f ResourceHandleProto'DtypeAndShape)
-> ((TensorShapeProto -> f TensorShapeProto)
    -> Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> (TensorShapeProto -> f TensorShapeProto)
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto)
-> (ResourceHandleProto'DtypeAndShape
    -> Maybe TensorShapeProto -> ResourceHandleProto'DtypeAndShape)
-> Lens
     ResourceHandleProto'DtypeAndShape
     ResourceHandleProto'DtypeAndShape
     (Maybe TensorShapeProto)
     (Maybe TensorShapeProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape
           (\ x__ :: ResourceHandleProto'DtypeAndShape
x__ y__ :: Maybe TensorShapeProto
y__
              -> ResourceHandleProto'DtypeAndShape
x__ {_ResourceHandleProto'DtypeAndShape'shape :: Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape = Maybe TensorShapeProto
y__}))
        (TensorShapeProto -> Lens' (Maybe TensorShapeProto) TensorShapeProto
forall b. b -> Lens' (Maybe b) b
Data.ProtoLens.maybeLens TensorShapeProto
forall msg. Message msg => msg
Data.ProtoLens.defMessage)
instance Data.ProtoLens.Field.HasField ResourceHandleProto'DtypeAndShape "maybe'shape" (Prelude.Maybe Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto) where
  fieldOf :: Proxy# "maybe'shape"
-> (Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
fieldOf _
    = ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
 -> ResourceHandleProto'DtypeAndShape
 -> f ResourceHandleProto'DtypeAndShape)
-> ((Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
    -> Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> (Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> ResourceHandleProto'DtypeAndShape
-> f ResourceHandleProto'DtypeAndShape
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
        ((ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto)
-> (ResourceHandleProto'DtypeAndShape
    -> Maybe TensorShapeProto -> ResourceHandleProto'DtypeAndShape)
-> Lens
     ResourceHandleProto'DtypeAndShape
     ResourceHandleProto'DtypeAndShape
     (Maybe TensorShapeProto)
     (Maybe TensorShapeProto)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
           ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape
           (\ x__ :: ResourceHandleProto'DtypeAndShape
x__ y__ :: Maybe TensorShapeProto
y__
              -> ResourceHandleProto'DtypeAndShape
x__ {_ResourceHandleProto'DtypeAndShape'shape :: Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape = Maybe TensorShapeProto
y__}))
        (Maybe TensorShapeProto -> f (Maybe TensorShapeProto))
-> Maybe TensorShapeProto -> f (Maybe TensorShapeProto)
forall a. a -> a
Prelude.id
instance Data.ProtoLens.Message ResourceHandleProto'DtypeAndShape where
  messageName :: Proxy ResourceHandleProto'DtypeAndShape -> Text
messageName _
    = String -> Text
Data.Text.pack "tensorflow.ResourceHandleProto.DtypeAndShape"
  packedMessageDescriptor :: Proxy ResourceHandleProto'DtypeAndShape -> ByteString
packedMessageDescriptor _
    = "\n\
      \\rDtypeAndShape\DC2*\n\
      \\ENQdtype\CAN\SOH \SOH(\SO2\DC4.tensorflow.DataTypeR\ENQdtype\DC22\n\
      \\ENQshape\CAN\STX \SOH(\v2\FS.tensorflow.TensorShapeProtoR\ENQshape"
  packedFileDescriptor :: Proxy ResourceHandleProto'DtypeAndShape -> ByteString
packedFileDescriptor _ = ByteString
packedFileDescriptor
  fieldsByTag :: Map Tag (FieldDescriptor ResourceHandleProto'DtypeAndShape)
fieldsByTag
    = let
        dtype__field_descriptor :: FieldDescriptor ResourceHandleProto'DtypeAndShape
dtype__field_descriptor
          = String
-> FieldTypeDescriptor DataType
-> FieldAccessor ResourceHandleProto'DtypeAndShape DataType
-> FieldDescriptor ResourceHandleProto'DtypeAndShape
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "dtype"
              (ScalarField DataType -> FieldTypeDescriptor DataType
forall value. ScalarField value -> FieldTypeDescriptor value
Data.ProtoLens.ScalarField ScalarField DataType
forall t. MessageEnum t => ScalarField t
Data.ProtoLens.EnumField ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.Types.DataType)
              (WireDefault DataType
-> Lens
     ResourceHandleProto'DtypeAndShape
     ResourceHandleProto'DtypeAndShape
     DataType
     DataType
-> FieldAccessor ResourceHandleProto'DtypeAndShape DataType
forall value msg.
WireDefault value -> Lens' msg value -> FieldAccessor msg value
Data.ProtoLens.PlainField
                 WireDefault DataType
forall value. (FieldDefault value, Eq value) => WireDefault value
Data.ProtoLens.Optional (forall s a (f :: * -> *).
(HasField s "dtype" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"dtype")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto'DtypeAndShape
        shape__field_descriptor :: FieldDescriptor ResourceHandleProto'DtypeAndShape
shape__field_descriptor
          = String
-> FieldTypeDescriptor TensorShapeProto
-> FieldAccessor ResourceHandleProto'DtypeAndShape TensorShapeProto
-> FieldDescriptor ResourceHandleProto'DtypeAndShape
forall value msg.
String
-> FieldTypeDescriptor value
-> FieldAccessor msg value
-> FieldDescriptor msg
Data.ProtoLens.FieldDescriptor
              "shape"
              (MessageOrGroup -> FieldTypeDescriptor TensorShapeProto
forall value.
Message value =>
MessageOrGroup -> FieldTypeDescriptor value
Data.ProtoLens.MessageField MessageOrGroup
Data.ProtoLens.MessageType ::
                 Data.ProtoLens.FieldTypeDescriptor Proto.Tensorflow.Core.Framework.TensorShape.TensorShapeProto)
              (Lens
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  (Maybe TensorShapeProto)
  (Maybe TensorShapeProto)
-> FieldAccessor ResourceHandleProto'DtypeAndShape TensorShapeProto
forall msg value.
Lens' msg (Maybe value) -> FieldAccessor msg value
Data.ProtoLens.OptionalField
                 (forall s a (f :: * -> *).
(HasField s "maybe'shape" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'shape")) ::
              Data.ProtoLens.FieldDescriptor ResourceHandleProto'DtypeAndShape
      in
        [(Tag, FieldDescriptor ResourceHandleProto'DtypeAndShape)]
-> Map Tag (FieldDescriptor ResourceHandleProto'DtypeAndShape)
forall k a. Ord k => [(k, a)] -> Map k a
Data.Map.fromList
          [(Int -> Tag
Data.ProtoLens.Tag 1, FieldDescriptor ResourceHandleProto'DtypeAndShape
dtype__field_descriptor),
           (Int -> Tag
Data.ProtoLens.Tag 2, FieldDescriptor ResourceHandleProto'DtypeAndShape
shape__field_descriptor)]
  unknownFields :: LensLike' f ResourceHandleProto'DtypeAndShape FieldSet
unknownFields
    = (ResourceHandleProto'DtypeAndShape -> FieldSet)
-> (ResourceHandleProto'DtypeAndShape
    -> FieldSet -> ResourceHandleProto'DtypeAndShape)
-> Lens' ResourceHandleProto'DtypeAndShape FieldSet
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.Family2.Unchecked.lens
        ResourceHandleProto'DtypeAndShape -> FieldSet
_ResourceHandleProto'DtypeAndShape'_unknownFields
        (\ x__ :: ResourceHandleProto'DtypeAndShape
x__ y__ :: FieldSet
y__
           -> ResourceHandleProto'DtypeAndShape
x__ {_ResourceHandleProto'DtypeAndShape'_unknownFields :: FieldSet
_ResourceHandleProto'DtypeAndShape'_unknownFields = FieldSet
y__})
  defMessage :: ResourceHandleProto'DtypeAndShape
defMessage
    = $WResourceHandleProto'DtypeAndShape'_constructor :: DataType
-> Maybe TensorShapeProto
-> FieldSet
-> ResourceHandleProto'DtypeAndShape
ResourceHandleProto'DtypeAndShape'_constructor
        {_ResourceHandleProto'DtypeAndShape'dtype :: DataType
_ResourceHandleProto'DtypeAndShape'dtype = DataType
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault,
         _ResourceHandleProto'DtypeAndShape'shape :: Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape = Maybe TensorShapeProto
forall a. Maybe a
Prelude.Nothing,
         _ResourceHandleProto'DtypeAndShape'_unknownFields :: FieldSet
_ResourceHandleProto'DtypeAndShape'_unknownFields = []}
  parseMessage :: Parser ResourceHandleProto'DtypeAndShape
parseMessage
    = let
        loop ::
          ResourceHandleProto'DtypeAndShape
          -> Data.ProtoLens.Encoding.Bytes.Parser ResourceHandleProto'DtypeAndShape
        loop :: ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
loop x :: ResourceHandleProto'DtypeAndShape
x
          = do Bool
end <- Parser Bool
Data.ProtoLens.Encoding.Bytes.atEnd
               if Bool
end then
                   do (let missing :: [a]
missing = []
                       in
                         if [Any] -> Bool
forall (t :: * -> *) a. Foldable t => t a -> Bool
Prelude.null [Any]
forall a. [a]
missing then
                             () -> Parser ()
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return ()
                         else
                             String -> Parser ()
forall (m :: * -> *) a. MonadFail m => String -> m a
Prelude.fail
                               (String -> ShowS
forall a. [a] -> [a] -> [a]
(Prelude.++)
                                  "Missing required fields: "
                                  ([String] -> String
forall a. Show a => a -> String
Prelude.show ([String]
forall a. [a]
missing :: [Prelude.String]))))
                      ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
forall (m :: * -> *) a. Monad m => a -> m a
Prelude.return
                        (Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                           forall msg. Message msg => Lens' msg FieldSet
Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> FieldSet -> FieldSet
forall a. [a] -> [a]
Prelude.reverse FieldSet
t) ResourceHandleProto'DtypeAndShape
x)
               else
                   do Word64
tag <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                      case Word64
tag of
                        8 -> do DataType
y <- Parser DataType -> String -> Parser DataType
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       ((Int -> DataType) -> Parser Int -> Parser DataType
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                          Int -> DataType
forall a. Enum a => Int -> a
Prelude.toEnum
                                          ((Word64 -> Int) -> Parser Word64 -> Parser Int
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.fmap
                                             Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral
                                             Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt))
                                       "dtype"
                                ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
loop (Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  DataType
  DataType
-> DataType
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "dtype" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"dtype") DataType
y ResourceHandleProto'DtypeAndShape
x)
                        18
                          -> do TensorShapeProto
y <- Parser TensorShapeProto -> String -> Parser TensorShapeProto
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
                                       (do Word64
len <- Parser Word64
Data.ProtoLens.Encoding.Bytes.getVarInt
                                           Int -> Parser TensorShapeProto -> Parser TensorShapeProto
forall a. Int -> Parser a -> Parser a
Data.ProtoLens.Encoding.Bytes.isolate
                                             (Word64 -> Int
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral Word64
len) Parser TensorShapeProto
forall msg. Message msg => Parser msg
Data.ProtoLens.parseMessage)
                                       "shape"
                                ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
loop (Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  TensorShapeProto
  TensorShapeProto
-> TensorShapeProto
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
forall s t a b. Setter s t a b -> b -> s -> t
Lens.Family2.set (forall s a (f :: * -> *).
(HasField s "shape" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"shape") TensorShapeProto
y ResourceHandleProto'DtypeAndShape
x)
                        wire :: Word64
wire
                          -> do !TaggedValue
y <- Word64 -> Parser TaggedValue
Data.ProtoLens.Encoding.Wire.parseTaggedValueFromWire
                                        Word64
wire
                                ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
loop
                                  (Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
-> (FieldSet -> FieldSet)
-> ResourceHandleProto'DtypeAndShape
-> ResourceHandleProto'DtypeAndShape
forall s t a b. Setter s t a b -> (a -> b) -> s -> t
Lens.Family2.over
                                     forall msg. Message msg => Lens' msg FieldSet
Setter
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
Data.ProtoLens.unknownFields (\ !FieldSet
t -> (:) TaggedValue
y FieldSet
t) ResourceHandleProto'DtypeAndShape
x)
      in
        Parser ResourceHandleProto'DtypeAndShape
-> String -> Parser ResourceHandleProto'DtypeAndShape
forall a. Parser a -> String -> Parser a
(Data.ProtoLens.Encoding.Bytes.<?>)
          (do ResourceHandleProto'DtypeAndShape
-> Parser ResourceHandleProto'DtypeAndShape
loop ResourceHandleProto'DtypeAndShape
forall msg. Message msg => msg
Data.ProtoLens.defMessage) "DtypeAndShape"
  buildMessage :: ResourceHandleProto'DtypeAndShape -> Builder
buildMessage
    = \ _x :: ResourceHandleProto'DtypeAndShape
_x
        -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
             (let
                _v :: DataType
_v = FoldLike
  DataType
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  DataType
  DataType
-> ResourceHandleProto'DtypeAndShape -> DataType
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "dtype" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"dtype") ResourceHandleProto'DtypeAndShape
_x
              in
                if DataType -> DataType -> Bool
forall a. Eq a => a -> a -> Bool
(Prelude.==) DataType
_v DataType
forall value. FieldDefault value => value
Data.ProtoLens.fieldDefault then
                    Builder
forall a. Monoid a => a
Data.Monoid.mempty
                else
                    Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                      (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 8)
                      ((Int -> Builder) -> (DataType -> Int) -> DataType -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                         ((Word64 -> Builder) -> (Int -> Word64) -> Int -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                            Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral)
                         DataType -> Int
forall a. Enum a => a -> Int
Prelude.fromEnum
                         DataType
_v))
             (Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                (case
                     FoldLike
  (Maybe TensorShapeProto)
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  (Maybe TensorShapeProto)
  (Maybe TensorShapeProto)
-> ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view (forall s a (f :: * -> *).
(HasField s "maybe'shape" a, Functor f) =>
(a -> f a) -> s -> f s
forall (x :: Symbol) s a (f :: * -> *).
(HasField s x a, Functor f) =>
(a -> f a) -> s -> f s
Data.ProtoLens.Field.field @"maybe'shape") ResourceHandleProto'DtypeAndShape
_x
                 of
                   Prelude.Nothing -> Builder
forall a. Monoid a => a
Data.Monoid.mempty
                   (Prelude.Just _v :: TensorShapeProto
_v)
                     -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                          (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt 18)
                          ((ByteString -> Builder)
-> (TensorShapeProto -> ByteString) -> TensorShapeProto -> Builder
forall b c a. (b -> c) -> (a -> b) -> a -> c
(Prelude..)
                             (\ bs :: ByteString
bs
                                -> Builder -> Builder -> Builder
forall a. Semigroup a => a -> a -> a
(Data.Monoid.<>)
                                     (Word64 -> Builder
Data.ProtoLens.Encoding.Bytes.putVarInt
                                        (Int -> Word64
forall a b. (Integral a, Num b) => a -> b
Prelude.fromIntegral (ByteString -> Int
Data.ByteString.length ByteString
bs)))
                                     (ByteString -> Builder
Data.ProtoLens.Encoding.Bytes.putBytes ByteString
bs))
                             TensorShapeProto -> ByteString
forall msg. Message msg => msg -> ByteString
Data.ProtoLens.encodeMessage
                             TensorShapeProto
_v))
                (FieldSet -> Builder
Data.ProtoLens.Encoding.Wire.buildFieldSet
                   (FoldLike
  FieldSet
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
-> ResourceHandleProto'DtypeAndShape -> FieldSet
forall a s t b. FoldLike a s t a b -> s -> a
Lens.Family2.view FoldLike
  FieldSet
  ResourceHandleProto'DtypeAndShape
  ResourceHandleProto'DtypeAndShape
  FieldSet
  FieldSet
forall msg. Message msg => Lens' msg FieldSet
Data.ProtoLens.unknownFields ResourceHandleProto'DtypeAndShape
_x)))
instance Control.DeepSeq.NFData ResourceHandleProto'DtypeAndShape where
  rnf :: ResourceHandleProto'DtypeAndShape -> ()
rnf
    = \ x__ :: ResourceHandleProto'DtypeAndShape
x__
        -> FieldSet -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
             (ResourceHandleProto'DtypeAndShape -> FieldSet
_ResourceHandleProto'DtypeAndShape'_unknownFields ResourceHandleProto'DtypeAndShape
x__)
             (DataType -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                (ResourceHandleProto'DtypeAndShape -> DataType
_ResourceHandleProto'DtypeAndShape'dtype ResourceHandleProto'DtypeAndShape
x__)
                (Maybe TensorShapeProto -> () -> ()
forall a b. NFData a => a -> b -> b
Control.DeepSeq.deepseq
                   (ResourceHandleProto'DtypeAndShape -> Maybe TensorShapeProto
_ResourceHandleProto'DtypeAndShape'shape ResourceHandleProto'DtypeAndShape
x__) ()))
packedFileDescriptor :: Data.ByteString.ByteString
packedFileDescriptor :: ByteString
packedFileDescriptor
  = "\n\
    \/tensorflow/core/framework/resource_handle.proto\DC2\n\
    \tensorflow\SUB,tensorflow/core/framework/tensor_shape.proto\SUB%tensorflow/core/framework/types.proto\"\246\STX\n\
    \\DC3ResourceHandleProto\DC2\SYN\n\
    \\ACKdevice\CAN\SOH \SOH(\tR\ACKdevice\DC2\FS\n\
    \\tcontainer\CAN\STX \SOH(\tR\tcontainer\DC2\DC2\n\
    \\EOTname\CAN\ETX \SOH(\tR\EOTname\DC2\ESC\n\
    \\thash_code\CAN\EOT \SOH(\EOTR\bhashCode\DC2&\n\
    \\SImaybe_type_name\CAN\ENQ \SOH(\tR\rmaybeTypeName\DC2Y\n\
    \\DC1dtypes_and_shapes\CAN\ACK \ETX(\v2-.tensorflow.ResourceHandleProto.DtypeAndShapeR\SIdtypesAndShapes\SUBo\n\
    \\rDtypeAndShape\DC2*\n\
    \\ENQdtype\CAN\SOH \SOH(\SO2\DC4.tensorflow.DataTypeR\ENQdtype\DC22\n\
    \\ENQshape\CAN\STX \SOH(\v2\FS.tensorflow.TensorShapeProtoR\ENQshapeJ\EOT\b\a\DLE\bB\135\SOH\n\
    \\CANorg.tensorflow.frameworkB\SOResourceHandleP\SOHZVgithub.com/tensorflow/tensorflow/tensorflow/go/core/framework/resource_handle_go_proto\248\SOH\SOHJ\197\n\
    \\n\
    \\ACK\DC2\EOT\NUL\NUL,\SOH\n\
    \\b\n\
    \\SOH\f\DC2\ETX\NUL\NUL\DC2\n\
    \\b\n\
    \\SOH\STX\DC2\ETX\STX\NUL\DC3\n\
    \\t\n\
    \\STX\ETX\NUL\DC2\ETX\EOT\NUL6\n\
    \\t\n\
    \\STX\ETX\SOH\DC2\ETX\ENQ\NUL/\n\
    \\b\n\
    \\SOH\b\DC2\ETX\a\NUL\US\n\
    \\t\n\
    \\STX\b\US\DC2\ETX\a\NUL\US\n\
    \\b\n\
    \\SOH\b\DC2\ETX\b\NUL/\n\
    \\t\n\
    \\STX\b\b\DC2\ETX\b\NUL/\n\
    \\b\n\
    \\SOH\b\DC2\ETX\t\NUL\"\n\
    \\t\n\
    \\STX\b\n\
    \\DC2\ETX\t\NUL\"\n\
    \\b\n\
    \\SOH\b\DC2\ETX\n\
    \\NUL1\n\
    \\t\n\
    \\STX\b\SOH\DC2\ETX\n\
    \\NUL1\n\
    \\b\n\
    \\SOH\b\DC2\ETX\v\NULm\n\
    \\t\n\
    \\STX\b\v\DC2\ETX\v\NULm\n\
    \\184\SOH\n\
    \\STX\EOT\NUL\DC2\EOT\DLE\NUL,\SOH\SUB\171\SOH Protocol buffer representing a handle to a tensorflow resource. Handles are\n\
    \ not valid across executions, but can be serialized back and forth from within\n\
    \ a single run.\n\
    \\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\SOH\DC2\ETX\DLE\b\ESC\n\
    \B\n\
    \\EOT\EOT\NUL\STX\NUL\DC2\ETX\DC2\STX\DC4\SUB5 Unique name for the device containing the resource.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ENQ\DC2\ETX\DC2\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\SOH\DC2\ETX\DC2\t\SI\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\NUL\ETX\DC2\ETX\DC2\DC2\DC3\n\
    \:\n\
    \\EOT\EOT\NUL\STX\SOH\DC2\ETX\NAK\STX\ETB\SUB- Container in which this resource is placed.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ENQ\DC2\ETX\NAK\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\SOH\DC2\ETX\NAK\t\DC2\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\SOH\ETX\DC2\ETX\NAK\NAK\SYN\n\
    \,\n\
    \\EOT\EOT\NUL\STX\STX\DC2\ETX\CAN\STX\DC2\SUB\US Unique name of this resource.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ENQ\DC2\ETX\CAN\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\SOH\DC2\ETX\CAN\t\r\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\STX\ETX\DC2\ETX\CAN\DLE\DC1\n\
    \s\n\
    \\EOT\EOT\NUL\STX\ETX\DC2\ETX\FS\STX\ETB\SUBf Hash code for the type of the resource. Is only valid in the same device\n\
    \ and in the same execution.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\ENQ\DC2\ETX\FS\STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\SOH\DC2\ETX\FS\t\DC2\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ETX\ETX\DC2\ETX\FS\NAK\SYN\n\
    \]\n\
    \\EOT\EOT\NUL\STX\EOT\DC2\ETX \STX\GS\SUBP For debug-only, the name of the type pointed to by this handle, if\n\
    \ available.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\ENQ\DC2\ETX \STX\b\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\SOH\DC2\ETX \t\CAN\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\EOT\ETX\DC2\ETX \ESC\FS\n\
    \Q\n\
    \\EOT\EOT\NUL\ETX\NUL\DC2\EOT#\STX&\ETX\SUBC Protocol buffer representing a pair of (data type, tensor shape).\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\ETX\NUL\SOH\DC2\ETX#\n\
    \\ETB\n\
    \\r\n\
    \\ACK\EOT\NUL\ETX\NUL\STX\NUL\DC2\ETX$\EOT\ETB\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\NUL\ACK\DC2\ETX$\EOT\f\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\NUL\SOH\DC2\ETX$\r\DC2\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\NUL\ETX\DC2\ETX$\NAK\SYN\n\
    \\r\n\
    \\ACK\EOT\NUL\ETX\NUL\STX\SOH\DC2\ETX%\EOT\US\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\SOH\ACK\DC2\ETX%\EOT\DC4\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\SOH\SOH\DC2\ETX%\NAK\SUB\n\
    \\SO\n\
    \\a\EOT\NUL\ETX\NUL\STX\SOH\ETX\DC2\ETX%\GS\RS\n\
    \A\n\
    \\EOT\EOT\NUL\STX\ENQ\DC2\ETX)\STX/\SUB4 Data types and shapes for the underlying resource.\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\EOT\DC2\ETX)\STX\n\
    \\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\ACK\DC2\ETX)\v\CAN\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\SOH\DC2\ETX)\EM*\n\
    \\f\n\
    \\ENQ\EOT\NUL\STX\ENQ\ETX\DC2\ETX)-.\n\
    \\n\
    \\n\
    \\ETX\EOT\NUL\t\DC2\ETX+\STX\r\n\
    \\v\n\
    \\EOT\EOT\NUL\t\NUL\DC2\ETX+\v\f\n\
    \\f\n\
    \\ENQ\EOT\NUL\t\NUL\SOH\DC2\ETX+\v\f\n\
    \\f\n\
    \\ENQ\EOT\NUL\t\NUL\STX\DC2\ETX+\v\fb\ACKproto3"